rendered paste bodysub_41CBA0 proc near ; CODE XREF: sub_410110+8Cp
; sub_427120+14Ap ...
var_2= byte ptr -2
var_1= byte ptr -1
arg_0= dword ptr 8
arg_4= dword ptr 0Ch
push ebp
mov ebp, esp
push ecx
mov eax, [ebp+arg_0] ; eax = arg_0
mov cl, [eax] ; cl = * (byte *) arg_0
mov [ebp+var_1], cl ; var_1 = cl
; so... var_1 = * (byte *) arg_0
mov edx, [ebp+arg_0] ; edx = arg_0
mov eax, [ebp+arg_4] ; eax = arg_4
mov cl, [eax] ; cl = * (byte *) arg_4
mov [edx], cl ; *(byte *) arg_0 = cl
; so... * (byte *) arg_0 = * (byte *) arg_4
mov edx, [ebp+arg_4] ; edx = arg_4
mov al, [ebp+var_1] ; al = var_1
mov [edx], al ; *(byte *) arg_4 = al
; so... * (byte *) arg_4 = var_1
; that referenced w/ the set of var_1 from above...
; it would be ... * (byte *) arg_4 = * (byte *) arg_0
; the inverse of what is in the middle here
mov esp, ebp
pop ebp
retn
; This is simply 'Transpose Memory Bytes'.
; Crap like this is strewn throughout the code... it should be optimized far better.
; It should be inlined, like;
mov al, [esi]
mov ah, [edi]
mov [esi], ah
mov [edi], al
; I understand this was compiled with MSVC 2003, but that is nuts.