Function at 0x4013e0
Capabilities:
Print debug messages
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1a4
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x19c], eax
mov eax, dword [esp + 0x1a8]
push ebx
push ebp
push esi
push edi
push 0x40
mov dword [esp + 0x38], eax
mov ebx, edx
lea eax, [esp + 0x144]
mov dword [esp + 0x28], ebx
mov ebp, ecx
mov dword [esp + 0x44], 0
push 0
push eax
mov dword [esp + 0x50], ebp
call fcn.00403e60
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [esp + 0x1c]
add esp, 0xc
push eax
push 0x40
lea eax, [esp + 0x148]
push eax
push ebx
push ebp
call edi
test eax, eax
je 0x4017ee
cmp dword [esp + 0x10], 0x40
jb 0x4017ee
push pe_nt_image_headers32
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00403e60
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push pe_nt_image_headers32
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x188]
add eax, ebx
push eax
push ebp
call edi
test eax, eax
je 0x4017ee
cmp dword [esp + 0x10], 0xf8
jb 0x4017ee
mov eax, 0x10b
cmp word [esp + 0x60], ax
je 0x4014b6
push 9
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4017ee
movzx ecx, word [esp + 0x5c]
xor esi, esi
mov eax, dword [esp + 0x17c]
add ecx, 0x18
add eax, ecx
mov dword [esp + 0x118], 0
xor ecx, ecx
mov dword [esp + 0x11c], 0
cmp cx, word [esp + 0x4e]
jae 0x401583
add ebx, eax
nop
lea eax, [esp + 0x10]
xorps xmm0, xmm0
push eax
push 0x28
lea eax, [esp + 0x18c]
movq qword [esp + 0x1ac], xmm0
push eax
push ebx
push ebp
movups xmmword [esp + 0x198], xmm0
movups xmmword [esp + 0x1a8], xmm0
call edi
test eax, eax
je 0x4017ee
cmp dword [esp + 0x10], 0x28
jb 0x4017ee
cmp dword [esp + 0x120], 0
mov edx, dword [esp + 0xc8]
jne 0x401570
mov ecx, dword [esp + 0x190]
cmp edx, ecx
jb 0x401570
mov edi, dword [esp + 0x194]
lea eax, [edi + ecx]
cmp edx, eax
jae 0x40156a
mov dword [esp + 0x120], ecx
mov dword [esp + 0x124], edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
movzx eax, word [esp + 0x4e]
inc esi
add ebx, 0x28
cmp esi, eax
jb 0x4014f0
jmp 0x40158a
mov edx, dword [esp + 0xc8]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test edx, edx
je 0x40160a
cmp dword [esp + 0xcc], 0
jne 0x40160a
mov esi, dword [esp + 0x24]
lea eax, [esp + 0x184]
push 0
push 0x14
push eax
add esi, edx
push esi
push ebp
call edi
test eax, eax
je 0x4017ee
nop dword [eax]
add dword [esp + 0xcc], 0x14
cmp dword [esp + 0x190], 0
je 0x4015ee
push 0
push 0x14
lea eax, [esp + 0x18c]
add esi, 0x14
push eax
push esi
push ebp
call edi
test eax, eax
jne 0x4015c0
jmp 0x4017ee
call ebx
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 esi, eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call ebx
cmp eax, esi
je 0x40160a
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, 0xcccccccd
mul dword [esp + 0xcc]
shr edx, 4
lea eax, [edx + edx*4]
shl eax, 2
mov dword [esp + 0x2c], eax
add eax, 0x14
cmp eax, 0x14
jb 0x4017ee
lea ebx, [eax + 7]
and ebx, 0xfffffff8
mov dword [esp + 0x28], ebx
cmp ebx, eax
jb 0x4017ee
lea eax, [esp + 0x30]
mov ecx, 0x10
push eax
call fcn.004011f0
add esp, 4
test eax, eax
jne 0x4017ee
mov ecx, dword [esp + 0x30]
add ecx, ebx
mov dword [esp + 0x20], ecx
cmp ecx, ebx
jb 0x4017ee
mov edi, dword [esp + 0x34]
mov ebx, ecx
xor edx, edx
mov ecx, dword [edi + edx*4]
lea esi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401680
sub ecx, esi
lea eax, [ecx + 4]
and eax, 0xfffffffc
add eax, ebx
cmp eax, ebx
jb 0x4017ee
inc edx
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp edx, 1
jb 0x401675
push ebx
call fcn.00402eac
add esp, 4
mov dword [esp + 0x1c], eax
push ebx
push 0
push eax
call fcn.00403e60
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x190]
mov esi, dword [esp + 0x78]
add esp, 0xc
add esi, edx
mov dword [esp + 0x19c], 0
add esi, dword [esp + 0x68]
xorps xmm0, xmm0
add esi, dword [esp + 0x64]
add esi, dword [esp + 0x74]
push 0x1c
cmp edx, esi
movq qword [esp + 0x198], xmm0
push eax
cmovae esi, edx
push esi
push ebp
mov dword [esp + 0x24], esi
movups xmmword [esp + 0x194], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x4017dc
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
nop dword [eax]
mov edx, dword [esp + 0x190]
mov eax, edx
and eax, 0xfff
cmp eax, 0xfff
je 0x4017e2
cmp dword [esp + 0x194], 0x10000
mov ecx, dword [esp + 0x184]
jne 0x4017a0
cmp ecx, dword [esp + 0x14]
lea eax, [edx + ecx]
cmova esi, ecx
add esi, 0xffff
and esi, 0xffff0000
cmp esi, eax
jae 0x40179c
push 4
push 0x3000
push ebx
push esi
push ebp
call edi
mov ebx, eax
test ebx, ebx
jne 0x40180b
mov edx, dword [esp + 0x190]
add esi, 0x10000
mov ecx, dword [esp + 0x184]
mov ebx, dword [esp + 0x18]
lea eax, [edx + ecx]
cmp esi, eax
jb 0x401767
mov esi, dword [esp + 0x14]
lea eax, [edx + ecx]
mov dword [esp + 0x19c], 0
push 0x1c
lea ecx, [esp + 0x188]
xorps xmm0, xmm0
push ecx
push eax
push ebp
movups xmmword [esp + 0x194], xmm0
movq qword [esp + 0x1a4], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jne 0x401720
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0x1c]
call fcn.00402ea7
add esp, 4
mov ecx, dword [esp + 0x1ac]
mov eax, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00402c4e
add esp, 0x1a4
ret
mov edx, dword [esp + 0x24]
mov edi, ebx
mov ecx, dword [esp + 0xc8]
sub edi, edx
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], 0
test ecx, ecx
je 0x401851
mov esi, dword [esp + 0x2c]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x20]
push esi
add eax, 0x14
push eax
lea eax, [ecx + edx]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4017e2
cmp dword [esp + 0x10], esi
jb 0x4017e2
mov esi, dword [esp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x14], ecx
lea eax, [esi + 4]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x28]
lea edx, [edi + eax]
add eax, 4
add eax, esi
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
nop word [eax + eax]
mov edi, dword [esp + 0x18]
lea esi, [esi + edx]
mov ebp, ebx
sub edi, edx
je 0x4017e2
cmp edi, 0x7fffffff
ja 0x401a5c
mov eax, dword [esp + 0x34]
mov edx, edi
push ecx
push dword [eax + ecx*4]
push ecx
mov ecx, esi
call fcn.004011a0
test eax, eax
js 0x4017e2
test esi, esi
je 0x4018d9
cmp edi, 2
jb 0x4018d9
cmp byte [esi], 0x3f
jne 0x4018cb
cmp byte [esi + 1], 0x3f
je 0x4018d4
dec edi
inc esi
cmp edi, 2
jae 0x4018c0
jmp 0x4018d9
mov word [esi], 0x3233
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov dword [esi - 4], ebp
mov dword [edi - 4], 0x80000001
mov dword [edi], 0
lea eax, [ebp + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x20]
mov dword [edi + 4], 0x80000001
mov dword [edi + 8], 0
mov dword [esi + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esi], 0
mov dword [esi + 4], 0
mov ecx, dword [eax + ecx*4]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401930
sub ecx, edx
add esi, 0x14
mov edx, dword [esp + 0x20]
add ebp, 0x10
add edi, 0x10
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x1c]
lea eax, [ecx + 4]
mov dword [esp + 0x28], ebp
mov ecx, dword [esp + 0x14]
and eax, 0xfffffffc
inc ecx
mov dword [esp + 0x2c], edi
add edx, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], edx
cmp ecx, 1
jb 0x401880
mov edi, dword [esp + 0x44]
mov eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push edx
push eax
push ebx
push edi
call esi
test eax, eax
je 0x4017e2
cmp dword [esp + 0x120], 0
jne 0x4019b2
mov eax, dword [esp + 0x38]
mov dword [esp + 0x120], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x124], eax
jmp 0x4019b6
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x24]
mov edx, ebx
mov dword [esp + 0xcc], eax
lea eax, [esp + 0x3c]
push eax
push 0x40
push dword [esp + 0xa4]
mov dword [esp + 0xd4], ecx
mov ecx, edi
call fcn.00402490
test eax, eax
je 0x4017e2
push 0
push 0x40
lea eax, [esp + 0x148]
mov dword [esp + 0xa8], 0
push eax
push ebx
push edi
call esi
test eax, eax
je 0x4017e2
push 0
push pe_nt_image_headers32
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x188]
add eax, ebx
push eax
push edi
call esi
test eax, eax
je 0x4017e2
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x40]
push dword [esp + 0xa4]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x4017e2
mov dword [esp + 0x40], 1
jmp 0x4017e2
mov byte [esi], 0
jmp 0x4017e2