Quote from: mrdries on June 02, 2023, 04:01:21 PMI'm using Stressed 0.2.1 now, which is very cool. Though I'm not sure I'm losing a lot of functionality or not.
0.2.1 seems latest so you're not losing anything
Herr Otto Partz says you're all nothing but pipsqueaks!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: mrdries on June 02, 2023, 04:01:21 PMI'm using Stressed 0.2.1 now, which is very cool. Though I'm not sure I'm losing a lot of functionality or not.
QuoteI found the source in the Github. But then I'd have to compile it myself. I'll give that a try.
Quote from: Daniel3D on October 30, 2022, 11:49:25 AMThere are a lot of them (if i read correctly)
Is it possible to redo it while maintaining the labels and comments that are made?
Quotesadly that feature can't be reverted
Quote from: llm on October 16, 2022, 03:41:54 PMim currently a little bit confused about the current state of some functions in the asmorig - some of the functions you've showed me are full of unused labels, messing the asm code a little
these labels do not exists if i freshly analyze the current game exe with IDA - need to find out what these labels are for
Quote from: Daniel3D on October 20, 2022, 09:43:28 AMQuote from: llm on October 16, 2022, 03:41:54 PMim currently a little bit confused about the current state of some functions in the asmorig - some of the functions you've showed me are full of unused labels, messing the asm code a little
these labels do not exists if i freshly analyze the current game exe with IDA - need to find out what these labels are for
The code has things that even i find strange, like in seg000:loc_143BB:
cmp ax, 4D00h
[u]jnz short loc_143C3[/u]
jmp loc_144A4
loc_143C3:
jmp loc_14188
loc_143C6:
cmp [bp+var_selectedmenu], 0
jnz sh
I guess this could be written as:loc_143BB:
cmp ax, 4D00h
jnz short loc_14188 ;loc_143C3
jmp loc_144A4
;loc_143C3:
;jmp loc_14188
loc_143C6:
cmp [bp+var_selectedmenu], 0
jnz sh
QuoteIt was my first 3d game and I made many mistakes
... For this reason the number of arguments is not appended to the name of the function by the compiler, and the assembler and the linker are therefore unable to determine if an incorrect number of arguments is used...
Quote from: Daniel3D on October 17, 2022, 11:10:32 AMIs this kind of optimization the reason that it is difficult to reverse assembly back to C? (after it is assembled, compiled, decompiled, disassembled and converted to C) I probably have the steps wrong or mixed but (again >) you know what I mean.![]()
Quote from: Daniel3D on October 17, 2022, 10:36:21 AMIs it possible to "fix" these functions with your disassembled code. (I still have to process the rest of the code, maybe i can do that Wednesday or Friday). If both versions create a bit perfect assembly then they should be interchangeable right?
Quote from: Daniel3D on October 17, 2022, 10:55:35 AMI kinda get what you mean, but this is a few steps too advanced for me. I don't really know how memory stacking works. I have a vague impression, but that is part literal and part logical and most likely a big part wrong..![]()
push 1
push 2
push 3
pop ax => 3
pop bx => 2
pop cx => 1
seg016:0008 push [bp+arg_4] ; 2 byte push - parameter 2
seg016:000B push [bp+arg_2] ; 2 byte push - parameter 1
seg016:000E push [bp+arg_0] ; 2 byte push - parameter 0
seg016:0011 call sub_30F9D
seg016:0016 add sp, 6 ; 3*2
seg016:0002 locate_many_resources proc far ; CODE XREF: load_intro_resources+2A␘P
seg016:0002 ; run_opponent_menu+4A␘P
seg016:0002 ; load_skybox+60␘P
seg016:0002 ; load_sdgame2_shapes+2C␘P
seg016:0002 ; setup_intro+2E␘P
seg016:0002 ; setup_car_shapes+9C␘P
seg016:0002 ; setup_car_shapes+B4␘P
seg016:0002 ; setup_car_shapes+D3␘P
seg016:0002 ; loop_game+34␘P
seg016:0002 ; load_tracks_menu_shapes:loc_2A2E3␘P
seg016:0002 ; load_tracks_menu_shapes:loc_2A2F9␘P
seg016:0002 ; load_tracks_menu_shapes+53␘P
seg016:0002
seg016:0002 arg_0 = word ptr 6
seg016:0002 arg_2 = word ptr 8
seg016:0002 arg_4 = word ptr 0Ah
seg016:0002 arg_6 = word ptr 0Ch
seg016:0002
seg016:0002 push bp
seg016:0003
seg016:0003 loc_367B3:
seg016:0003 mov bp, sp
seg016:0005
seg016:0005 loc_367B5:
seg016:0005 jmp short loc_367D9
seg016:0005 ; ---------------------------------------------------------------------------
seg016:0007 align 2
seg016:0008
seg016:0008 loc_367B8: ; CODE XREF: locate_many_resources+2D␙j
seg016:0008 push [bp+arg_4]
seg016:000B
seg016:000B loc_367BB:
seg016:000B push [bp+arg_2]
seg016:000E
seg016:000E loc_367BE:
seg016:000E push [bp+arg_0]
seg016:0011
seg016:0011 loc_367C1:
seg016:0011 call locate_shape_fatal
seg016:0016
seg016:0016 loc_367C6:
seg016:0016 add sp, 6
seg016:0019
seg016:0019 loc_367C9:
seg016:0019 mov bx, [bp+arg_6]
seg016:001C
seg016:001C loc_367CC:
seg016:001C add [bp+arg_6], 4
seg016:0020
seg016:0020 loc_367D0:
seg016:0020 mov [bx], ax
seg016:0022 mov [bx+2], dx
seg016:0025 add [bp+arg_4], 4
seg016:0029
seg016:0029 loc_367D9: ; CODE XREF: locate_many_resources:loc_367B5␘j
seg016:0029 mov bx, [bp+arg_4]
seg016:002C
seg016:002C loc_367DC:
seg016:002C cmp byte ptr [bx], 0
seg016:002F jnz short loc_367B8
seg016:0031 pop bp
seg016:0032 retf
seg016:0032 locate_many_resources endp
seg016:0002 sub_367B2 proc far ; CODE XREF: sub_10786+2A␘P
seg016:0002 ; sub_1293C+4A␘P ...
seg016:0002
seg016:0002 arg_0 = word ptr 6
seg016:0002 arg_2 = word ptr 8
seg016:0002 arg_4 = word ptr 0Ah
seg016:0002 arg_6 = word ptr 0Ch
seg016:0002
seg016:0002 push bp
seg016:0003 mov bp, sp
seg016:0005 jmp short loc_367D9
seg016:0005 ; ---------------------------------------------------------------------------
seg016:0007 nop
seg016:0008
seg016:0008 loc_367B8: ; CODE XREF: sub_367B2+2D␙j
seg016:0008 push [bp+arg_4]
seg016:000B push [bp+arg_2]
seg016:000E push [bp+arg_0]
seg016:0011 call sub_30F9D
seg016:0016 add sp, 6
seg016:0019 mov bx, [bp+arg_6]
seg016:001C add [bp+arg_6], 4
seg016:0020 mov [bx], ax
seg016:0022 mov [bx+2], dx
seg016:0025 add [bp+arg_4], 4
seg016:0029
seg016:0029 loc_367D9: ; CODE XREF: sub_367B2+3␘j
seg016:0029 mov bx, [bp+arg_4]
seg016:002C cmp byte ptr [bx], 0
seg016:002F jnz short loc_367B8
seg016:0031 pop bp
seg016:0032 retf
seg016:0032 sub_367B2 endp
Quote from: Daniel3D on October 16, 2022, 06:23:19 PMCan it be that the ida has mistaken them for labels and that they are just values?
Quote from: Daniel3D on October 16, 2022, 06:23:19 PMI don't know how much the ida has evolved since the first disassembly. Also from what I've read about the process I have a feeling that you have a bit more experience with this. So maybe your settings create a cleaner result..
Quote from: Daniel3D on October 16, 2022, 06:23:19 PMThat would be unfortunate because that would mean that it is smart to redo the entire process. And there has been done a lot of research and analyzing that has to be copied and checked.
Quote from: Daniel3D on October 16, 2022, 03:28:12 PMThank you. That really makes it clearer. I kind of deducted the functionality but this is a lot more detailed.
Quote from: Daniel3D on October 16, 2022, 03:28:12 PMMy guess is that if the non symbolic offsets are fixed and the para alignment (do i say that correctly? You know what I mean) is done. Then it may be very easy to expand the horizons.