Function at 0x405040
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x423680]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x194], eax
mov eax, dword [ebp + 0x14]
push 0x40
mov dword [ebp - 0x170], eax
lea eax, [ebp - 0x16c]
push 0
push eax
mov dword [ebp - 0x178], edi
mov dword [ebp - 0x174], esi
mov dword [ebp - 0x1a0], 0
call fcn.00406780
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 8]
add esp, 0xc
push eax
push 0x40
lea eax, [ebp - 0x16c]
push eax
push edi
push esi
call ebx
test eax, eax
je 0x40569e
cmp dword [ebp - 8], 0x40
jb 0x40569e
push 0xf8
lea eax, [ebp - 0x12c]
push 0
push eax
call fcn.00406780
add esp, 0xc
lea eax, [ebp - 8]
push eax
push 0xf8
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [ebp - 0x130]
add eax, edi
push eax
push esi
call ebx
test eax, eax
je 0x40569e
cmp dword [ebp - 8], 0xf8
jb 0x40569e
mov eax, 0x10b
cmp word [ebp - 0x114], ax
je 0x405134
push 9
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x1a0]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004056d3
mov esp, ebp
pop ebp
ret
movzx ecx, word [ebp - 0x118]
xor edi, edi
mov eax, dword [ebp - 0x130]
add ecx, 0x18
add eax, ecx
mov dword [ebp - 0x5c], 0
xor ecx, ecx
mov dword [ebp - 0x58], 0
cmp cx, word [ebp - 0x126]
jae 0x4051e4
mov ebx, dword [ebp - 0x178]
add ebx, eax
nop dword [eax]
lea eax, [ebp - 8]
xorps xmm0, xmm0
push eax
push 0x28
lea eax, [ebp - 0x34]
movq qword [ebp - 0x14], xmm0
push eax
push ebx
push esi
movups xmmword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x24], xmm0
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x40569e
cmp dword [ebp - 8], 0x28
jb 0x40569e
cmp dword [ebp - 0x54], 0
mov edx, dword [ebp - 0xac]
jne 0x4051cd
mov ecx, dword [ebp - 0x28]
cmp edx, ecx
jb 0x4051cd
mov esi, dword [ebp - 0x24]
lea eax, [esi + ecx]
cmp edx, eax
jae 0x4051c7
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], esi
mov esi, dword [ebp - 0x174]
movzx eax, word [ebp - 0x126]
inc edi
add ebx, 0x28
cmp edi, eax
jb 0x405170
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
jmp 0x4051ea
mov edx, dword [ebp - 0xac]
test edx, edx
je 0x40527a
cmp dword [ebp - 0xa8], 0
jne 0x40527a
mov esi, dword [ebp - 0x178]
lea eax, [ebp - 0x20]
mov edi, dword [ebp - 0x174]
add esi, edx
push 0
push 0x14
push eax
push esi
push edi
call ebx
test eax, eax
je 0x40569e
add dword [ebp - 0xa8], 0x14
cmp dword [ebp - 0x14], 0
je 0x405258
push 0
push 0x14
lea eax, [ebp - 0x20]
add esi, 0x14
push eax
push esi
push edi
call ebx
test eax, eax
jne 0x405221
mov eax, dword [ebp - 0x1a0]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004056d3
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push str._This_PE_file_has_an_import_table__but_the_import_table_size_is_marked_as_0._This_is_an_error.If_it_is_not_repaired__the_launched_program_will_not_work_properly__Detours_has_automatically_repaired_its_import_table_size_for_you_______r_n
mov edi, eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call esi
cmp eax, edi
je 0x40527a
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, 0xcccccccd
mul dword [ebp - 0xa8]
mov eax, dword [ebp - 0x170]
mov ecx, edx
mov edx, 0x14
mul edx
shr ecx, 4
mov esi, eax
test edx, edx
ja 0x40569e
jb 0x4052ac
cmp esi, 0xffffffff
ja 0x40569e
lea eax, [ecx + ecx*4]
shl eax, 2
mov dword [ebp - 0x18c], eax
add eax, esi
cmp eax, esi
jb 0x40569e
lea edi, [eax + 7]
and edi, 0xfffffff8
cmp edi, eax
jb 0x40569e
lea eax, [ebp - 0x190]
push eax
push dword [ebp - 0x170]
push 0x10
call fcn.00405010
add esp, 0xc
test eax, eax
jne 0x40569e
mov esi, dword [ebp - 0x190]
add esi, edi
mov dword [ebp - 0x180], esi
cmp esi, edi
jb 0x40569e
xor edx, edx
mov dword [ebp - 0x184], esi
cmp dword [ebp - 0x170], edx
jbe 0x405362
nop word [eax + eax]
mov eax, dword [ebp - 0x194]
mov ecx, dword [eax + edx*4]
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405330
sub ecx, esi
lea eax, [ecx + 4]
and eax, 0xfffffffc
add eax, dword [ebp - 0x184]
cmp eax, dword [ebp - 0x184]
jb 0x40569e
inc edx
mov esi, eax
mov dword [ebp - 0x184], esi
cmp edx, dword [ebp - 0x170]
jb 0x405320
push esi
call fcn.00405e2b
add esp, 4
mov dword [ebp - 0x17c], eax
test eax, eax
je 0x40569e
push esi
push 0
push eax
call fcn.00406780
mov edx, dword [ebp - 0x178]
mov ecx, dword [ebp - 0x108]
mov eax, dword [ebp - 0x100]
add ecx, edx
add ecx, dword [ebp - 0x10c]
add ecx, dword [ebp - 0x110]
add eax, ecx
cmp edx, eax
push esi
cmovae eax, edx
push eax
push edx
push dword [ebp - 0x174]
call fcn.00403c50
add esp, 0x1c
mov dword [ebp - 0x1a4], eax
test eax, eax
je 0x405690
mov ecx, dword [ebp - 0xac]
mov edx, eax
sub edx, dword [ebp - 0x178]
mov dword [ebp - 0x188], edx
mov dword [ebp - 0xc], 0
test ecx, ecx
je 0x40542d
mov edx, dword [ebp - 0x17c]
lea eax, [ebp - 8]
mov esi, dword [ebp - 0x18c]
push eax
mov eax, dword [ebp - 0x170]
push esi
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
push eax
mov eax, dword [ebp - 0x178]
add eax, ecx
push eax
push dword [ebp - 0x174]
call ebx
test eax, eax
je 0x405690
cmp dword [ebp - 8], esi
jb 0x405690
mov edx, dword [ebp - 0x188]
xor esi, esi
mov dword [ebp - 0x19c], esi
cmp dword [ebp - 0x170], esi
jbe 0x4055b3
mov ecx, dword [ebp - 0x17c]
lea eax, [ecx + 4]
mov dword [ebp - 0x190], eax
lea eax, [edx + edi]
mov dword [ebp - 0x198], eax
lea eax, [ecx + 4]
mov ecx, dword [ebp - 0x180]
add eax, edi
mov dword [ebp - 0x18c], eax
nop word [eax + eax]
mov eax, dword [ebp - 0x194]
mov ebx, dword [ebp - 0x184]
mov esi, dword [eax + esi*4]
mov eax, dword [ebp - 0x17c]
lea eax, [ecx + eax]
sub ebx, ecx
je 0x405690
cmp ebx, 0x7fffffff
ja 0x4055ab
mov edi, 0x7ffffffe
mov edx, ebx
sub edi, ebx
mov ecx, eax
sub esi, eax
nop dword [eax]
lea eax, [edx + edi]
test eax, eax
je 0x4054c6
mov al, byte [ecx + esi]
test al, al
je 0x4054c6
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x4054b0
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
je 0x405690
mov eax, dword [ebp - 0x17c]
mov esi, dword [ebp - 0x180]
add eax, esi
push 0x41ba00
push ebx
push eax
call fcn.00403e30
add esp, 0xc
test eax, eax
js 0x405690
mov ebx, dword [ebp - 0x190]
mov edi, dword [ebp - 0x18c]
mov eax, dword [ebp - 0x198]
mov dword [ebx - 4], eax
add eax, 8
mov dword [edi - 4], 0x80000001
mov dword [edi], 0
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x188]
mov dword [edi + 4], 0x80000001
add eax, esi
mov esi, dword [ebp - 0x19c]
mov dword [edi + 8], 0
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x194]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov ecx, dword [eax + esi*4]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405560
add dword [ebp - 0x198], 0x10
sub ecx, edx
inc esi
add edi, 0x10
add ebx, 0x14
mov dword [ebp - 0x19c], esi
mov dword [ebp - 0x18c], edi
lea eax, [ecx + 4]
mov dword [ebp - 0x190], ebx
mov ecx, dword [ebp - 0x180]
and eax, 0xfffffffc
add ecx, eax
mov dword [ebp - 0x180], ecx
cmp esi, dword [ebp - 0x170]
jb 0x405470
jmp 0x4055b9
mov byte [eax], 0
jmp 0x405690
mov ecx, dword [ebp - 0x180]
mov ebx, dword [ebp - 0x174]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push ecx
push dword [ebp - 0x17c]
push dword [ebp - 0x1a4]
push ebx
call esi
test eax, eax
je 0x405690
cmp dword [ebp - 0x54], 0
jne 0x4055f9
mov eax, dword [ebp - 0x188]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x184]
mov dword [ebp - 0x50], eax
jmp 0x4055ff
mov eax, dword [ebp - 0x184]
mov edi, dword [ebp - 0x178]
mov ecx, dword [ebp - 0x188]
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xc]
push eax
push 0x40
push dword [ebp - 0xd8]
mov dword [ebp - 0xac], ecx
push edi
push ebx
call fcn.00403890
test eax, eax
je 0x405690
push 0
push 0x40
lea eax, [ebp - 0x16c]
mov dword [ebp - 0xd4], 0
push eax
push edi
push ebx
call esi
test eax, eax
je 0x405690
push 0
push 0xf8
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [ebp - 0x130]
add eax, edi
push eax
push ebx
call esi
test eax, eax
je 0x405690
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0xd8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
xor ecx, ecx
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x1a0], ecx
push dword [ebp - 0x17c]
call fcn.00405e34
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1a0]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004056d3
mov esp, ebp
pop ebp
ret