Function at 0x405ef9
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b0
mov eax, dword [0x420040]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x174], eax
xor esi, esi
mov eax, dword [ebp + 0x10]
mov edi, edx
push 0x40
mov dword [ebp - 0x180], eax
mov ebx, ecx
lea eax, [ebp - 0x16c]
mov dword [ebp - 0x190], edi
push esi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x178]
push eax
push 0x40
lea eax, [ebp - 0x16c]
push eax
push edi
push ebx
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x4064d2
cmp dword [ebp - 0x178], 0x40
jb 0x4064d2
push pe_nt_image_headers32
lea eax, [ebp - 0x12c]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x178]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [ebp - 0x130]
add eax, edi
push eax
push ebx
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x4064d2
cmp dword [ebp - 0x178], 0xf8
jb 0x4064d2
mov eax, 0x10b
cmp word [ebp - 0x114], ax
je 0x405fd4
push 9
call sub.KERNEL32.dll_SetLastError
jmp 0x4064d2
movzx ecx, word [ebp - 0x118]
mov eax, dword [ebp - 0x130]
add ecx, 0x18
add eax, ecx
mov dword [ebp - 0x5c], esi
xor ecx, ecx
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x184], esi
cmp cx, word [ebp - 0x126]
jae 0x40608e
lea edx, [edi + eax]
mov dword [ebp - 0x170], edx
push 0xa
pop ecx
xor eax, eax
lea edi, [ebp - 0x30]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x178]
push eax
push 0x28
lea eax, [ebp - 0x30]
push eax
push edx
push ebx
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x4064d2
cmp dword [ebp - 0x178], 0x28
jb 0x4064d2
mov ecx, dword [ebp - 0xac]
cmp dword [ebp - 0x54], esi
jne 0x40605f
mov edx, dword [ebp - 0x24]
cmp ecx, edx
jb 0x40605f
mov edi, dword [ebp - 0x20]
lea eax, [edi + edx]
cmp ecx, eax
jae 0x40605f
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], edi
mov edi, dword [ebp - 0x184]
mov edx, dword [ebp - 0x170]
inc edi
movzx eax, word [ebp - 0x126]
add edx, 0x28
mov dword [ebp - 0x184], edi
mov dword [ebp - 0x170], edx
cmp edi, eax
jb 0x40600a
mov edi, dword [ebp - 0x190]
jmp 0x406094
mov ecx, dword [ebp - 0xac]
push 0x14
pop eax
test ecx, ecx
je 0x4060ed
cmp dword [ebp - 0xa8], esi
jne 0x4060ed
add edi, ecx
jmp 0x4060b7
push 0x14
pop eax
add dword [ebp - 0xa8], eax
cmp dword [ebp - 0x10], esi
je 0x4060cd
add edi, eax
push esi
push eax
lea eax, [ebp - 0x1c]
push eax
push edi
push ebx
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
jne 0x4060a7
jmp 0x4064d2
call sub.KERNEL32.dll_GetLastError
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 sub.KERNEL32.dll_OutputDebugStringW
call sub.KERNEL32.dll_GetLastError
cmp eax, edi
je 0x4060ed
push edi
call sub.KERNEL32.dll_SetLastError
mov eax, dword [ebp - 0xa8]
xor edx, edx
push 0x14
pop ecx
div ecx
mov edi, eax
mov eax, dword [ebp - 0x180]
mul ecx
mov ecx, eax
cmp edx, esi
ja 0x4064d2
jb 0x406119
cmp ecx, 0xffffffff
ja 0x4064d2
imul eax, edi, 0x14
mov dword [ebp - 0x170], eax
add eax, ecx
cmp eax, ecx
jb 0x4064d2
lea edi, [eax + 7]
and edi, 0xfffffff8
cmp edi, eax
jb 0x4064d2
mov ecx, dword [ebp - 0x180]
mov eax, ecx
push 0x10
pop edx
mul edx
cmp edx, esi
ja 0x4064d2
jb 0x40615a
cmp eax, 0xffffffff
ja 0x4064d2
add eax, edi
mov dword [ebp - 0x188], eax
cmp eax, edi
jb 0x4064d2
mov dword [ebp - 0x17c], eax
mov edx, esi
test ecx, ecx
je 0x4061bc
mov eax, dword [ebp - 0x174]
mov ecx, dword [eax + edx*4]
lea eax, [ecx + 1]
mov dword [ebp - 0x194], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406188
sub ecx, dword [ebp - 0x194]
lea eax, [ecx + 4]
and eax, 0xfffffffc
add eax, dword [ebp - 0x17c]
cmp eax, dword [ebp - 0x17c]
jb 0x4064d2
inc edx
mov dword [ebp - 0x17c], eax
cmp edx, dword [ebp - 0x180]
jb 0x406176
push eax
call fcn.00407928
pop ecx
push dword [ebp - 0x17c]
mov dword [ebp - 0x18c], eax
push esi
push eax
call sub.VCRUNTIME140.dll_memset
mov edx, dword [ebp - 0x190]
add esp, 0xc
mov ecx, dword [ebp - 0x108]
mov eax, dword [ebp - 0x100]
add ecx, edx
add ecx, dword [ebp - 0x10c]
add ecx, dword [ebp - 0x110]
push dword [ebp - 0x17c]
add eax, ecx
mov ecx, ebx
cmp edx, eax
cmovae eax, edx
push eax
call fcn.00405d40
mov dword [ebp - 0x1ac], eax
test eax, eax
je 0x4064c6
mov ecx, dword [ebp - 0x190]
sub eax, ecx
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0x184], eax
mov dword [ebp - 0x1a0], esi
test edx, edx
je 0x40627f
lea eax, [ebp - 0x178]
push eax
imul eax, dword [ebp - 0x180], 0x14
push dword [ebp - 0x170]
add eax, dword [ebp - 0x18c]
push eax
lea eax, [edx + ecx]
push eax
push ebx
call sub.KERNEL32.dll_ReadProcessMemory
test eax, eax
je 0x4064c6
mov eax, dword [ebp - 0x170]
cmp dword [ebp - 0x178], eax
jb 0x4064c6
mov eax, dword [ebp - 0x184]
mov dword [ebp - 0x194], esi
cmp dword [ebp - 0x180], esi
jbe 0x406401
mov ecx, dword [ebp - 0x18c]
add eax, edi
mov dword [ebp - 0x198], eax
lea eax, [ecx + 4]
add eax, edi
lea edx, [ecx + 4]
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x174]
mov dword [ebp - 0x170], edx
mov edx, dword [ebp - 0x188]
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x174]
mov edi, dword [ebp - 0x17c]
add ecx, edx
push dword [eax]
sub edi, edx
mov dword [ebp - 0x1a8], ecx
mov edx, edi
call fcn.00405b6f
test eax, eax
js 0x4064c6
test edi, edi
je 0x40631c
mov ecx, dword [ebp - 0x1a8]
test ecx, ecx
je 0x40631c
jmp 0x40630f
cmp byte [ecx], 0x3f
lea eax, [ecx + 1]
jne 0x40630c
cmp byte [eax], 0x3f
je 0x406316
dec edi
mov ecx, eax
cmp edi, 2
jae 0x4062ff
jmp 0x40631c
mov byte [ecx], 0x33
mov byte [eax], 0x32
mov ecx, dword [ebp - 0x170]
mov edi, dword [ebp - 0x198]
mov dword [ecx - 4], edi
cmp dword [ebp + 0xc], esi
je 0x406341
mov eax, dword [ebp - 0x1a4]
mov edx, dword [ebp - 0x174]
mov eax, dword [edx + eax]
jmp 0x406344
xor eax, eax
inc eax
mov edx, dword [ebp - 0x19c]
add eax, 0x80000000
mov dword [edx - 4], eax
lea eax, [edi + 8]
mov dword [edx], esi
mov dword [ecx + 0xc], eax
cmp dword [ebp + 0xc], esi
je 0x406370
mov eax, dword [ebp - 0x1a4]
mov edi, dword [ebp - 0x174]
mov eax, dword [eax + edi]
jmp 0x406373
xor eax, eax
inc eax
mov edi, dword [ebp - 0x184]
add eax, 0x80000000
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x188]
mov dword [edx + 8], esi
add eax, edi
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x174]
mov dword [ecx], esi
mov dword [ecx + 4], esi
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40639f
add dword [ebp - 0x198], 0x10
sub ecx, edx
mov edx, dword [ebp - 0x188]
add dword [ebp - 0x19c], 0x10
add dword [ebp - 0x170], 0x14
lea eax, [ecx + 4]
mov ecx, dword [ebp - 0x194]
and eax, 0xfffffffc
add edx, eax
mov eax, dword [ebp - 0x174]
inc ecx
mov dword [ebp - 0x188], edx
add eax, 4
mov dword [ebp - 0x194], ecx
cmp ecx, dword [ebp - 0x180]
mov ecx, dword [ebp - 0x18c]
mov dword [ebp - 0x174], eax
jb 0x4062ce
jmp 0x40640d
mov edi, dword [ebp - 0x184]
mov edx, dword [ebp - 0x188]
push esi
push edx
push dword [ebp - 0x18c]
push dword [ebp - 0x1ac]
push ebx
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x4064c6
mov eax, dword [ebp - 0x17c]
cmp dword [ebp - 0x54], esi
jne 0x40643a
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0xa8], eax
mov ecx, ebx
lea eax, [ebp - 0x1a0]
mov dword [ebp - 0xac], edi
mov edi, dword [ebp - 0x190]
mov edx, edi
push eax
push 0x40
push dword [ebp - 0xd8]
call fcn.00406cac
test eax, eax
je 0x4064c6
push esi
push 0x40
lea eax, [ebp - 0x16c]
mov dword [ebp - 0xd4], esi
push eax
push edi
push ebx
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x4064c6
push esi
push pe_nt_image_headers32
lea eax, [ebp - 0x12c]
push eax
mov eax, dword [ebp - 0x130]
add eax, edi
push eax
push ebx
call sub.KERNEL32.dll_WriteProcessMemory
test eax, eax
je 0x4064c6
lea eax, [ebp - 0x1a0]
push eax
push dword [ebp - 0x1a0]
push dword [ebp - 0xd8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
push 1
pop eax
cmovne esi, eax
push dword [ebp - 0x18c]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040765c
leave
ret 0xc