Function at 0x401ec0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
push ebx
push esi
push edi
push 0x40
lea eax, [ebp - 0x1a8]
mov dword [ebp - 0x3c], 0
mov edi, edx
mov esi, ecx
push 0
push eax
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
call fcn.00404e20
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 0xc]
add esp, 0xc
push eax
push 0x40
lea eax, [ebp - 0x1a8]
push eax
push edi
push esi
call ebx
test eax, eax
je 0x40227d
cmp dword [ebp - 0xc], 0x40
jb 0x40227d
push 0xf8
lea eax, [ebp - 0x168]
push 0
push eax
call fcn.00404e20
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
push 0xf8
lea eax, [ebp - 0x168]
push eax
mov eax, dword [ebp - 0x16c]
add eax, edi
push eax
push esi
call ebx
test eax, eax
je 0x40227d
cmp dword [ebp - 0xc], 0xf8
jb 0x40227d
mov eax, 0x10b
cmp word [ebp - 0x150], ax
je 0x401f80
push 9
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x3c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, word [ebp - 0x154]
xor esi, esi
mov eax, dword [ebp - 0x16c]
add ecx, 0x18
add eax, ecx
mov dword [ebp - 0x98], 0
xor ecx, ecx
mov dword [ebp - 0x94], 0
cmp cx, word [ebp - 0x162]
jae 0x40202b
add edi, eax
lea eax, [ebp - 0xc]
push eax
push 0x28
lea eax, [ebp - 0x64]
push eax
vpxor xmm0, xmm0, xmm0
push edi
push dword [ebp - 4]
vmovdqu ymmword [ebp - 0x64], ymm0
vmovq qword [ebp - 0x44], xmm0
vzeroupper
call ebx
test eax, eax
je 0x40227d
cmp dword [ebp - 0xc], 0x28
jb 0x40227d
cmp dword [ebp - 0x90], 0
mov edx, dword [ebp - 0xe8]
jne 0x40201a
mov ecx, dword [ebp - 0x58]
cmp edx, ecx
jb 0x40201a
mov ebx, dword [ebp - 0x54]
lea eax, [ebx + ecx]
cmp edx, eax
jae 0x402014
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0x8c], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
movzx eax, word [ebp - 0x162]
inc esi
add edi, 0x28
cmp esi, eax
jb 0x401fb5
jmp 0x402031
mov edx, dword [ebp - 0xe8]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test edx, edx
je 0x4020a8
cmp dword [ebp - 0xe4], 0
jne 0x4020a8
mov esi, dword [ebp - 8]
lea eax, [ebp - 0x50]
push 0
push 0x14
push eax
add esi, edx
push esi
push dword [ebp - 4]
call ebx
test eax, eax
je 0x40227d
nop
add dword [ebp - 0xe4], 0x14
cmp dword [ebp - 0x44], 0
je 0x40208c
push 0
push 0x14
lea eax, [ebp - 0x50]
add esi, 0x14
push eax
push esi
push dword [ebp - 4]
call ebx
test eax, eax
jne 0x402060
mov eax, dword [ebp - 0x3c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edi
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_OutputDebugStringW]
call edi
cmp eax, esi
je 0x4020a8
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [ebp + 0xc]
mov eax, 0xcccccccd
mul dword [ebp - 0xe4]
mov eax, ebx
mov ecx, edx
mov edx, 0x14
mul edx
shr ecx, 4
mov esi, eax
test edx, edx
ja 0x40227d
jb 0x4020d9
cmp esi, 0xffffffff
ja 0x40227d
lea eax, [ecx + ecx*4]
shl eax, 2
mov dword [ebp - 0x20], eax
add eax, esi
cmp eax, esi
jb 0x40227d
lea ecx, [eax + 7]
and ecx, 0xfffffff8
mov dword [ebp - 0x1c], ecx
cmp ecx, eax
jb 0x40227d
mov eax, ebx
mov edx, 0x10
mul edx
test edx, edx
ja 0x40227d
jb 0x402119
cmp eax, 0xffffffff
ja 0x40227d
add eax, ecx
mov dword [ebp - 0x14], eax
cmp eax, ecx
jb 0x40227d
xor edx, edx
mov ebx, eax
mov dword [ebp - 0x18], ebx
cmp dword [ebp + 0xc], edx
jbe 0x402164
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx*4]
lea esi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402140
sub ecx, esi
lea eax, [ecx + 4]
and eax, 0xfffffffc
add eax, ebx
cmp eax, ebx
jb 0x40227d
inc edx
mov ebx, eax
mov dword [ebp - 0x18], ebx
cmp edx, dword [ebp + 0xc]
jb 0x402132
push ebx
call fcn.00403eba
add esp, 4
mov dword [ebp - 0x10], eax
push ebx
push 0
push eax
call fcn.00404e20
mov ebx, dword [ebp - 0x144]
lea eax, [ebp - 0x58]
add ebx, dword [ebp - 0x148]
add esp, 0xc
add ebx, dword [ebp - 0x14c]
add ebx, dword [ebp - 0x13c]
mov ecx, dword [ebp - 8]
add ebx, ecx
push 0x1c
cmp ecx, ebx
mov dword [ebp - 0x40], 0
push eax
cmovae ebx, ecx
push ebx
push dword [ebp - 4]
vpxor xmm0, xmm0, xmm0
vmovdqu xmmword [ebp - 0x58], xmm0
vmovq qword [ebp - 0x48], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x402270
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edx, dword [ebp - 0x4c]
mov eax, edx
and eax, 0xfff
cmp eax, 0xfff
je 0x402272
cmp dword [ebp - 0x48], 0x10000
mov ecx, dword [ebp - 0x58]
jne 0x40223a
cmp ecx, ebx
lea eax, [edx + ecx]
mov esi, ebx
cmova esi, ecx
add esi, 0xffff
and esi, 0xffff0000
cmp esi, eax
jae 0x40223a
nop dword [eax]
push 4
push 0x3000
push dword [ebp - 0x18]
push esi
push dword [ebp - 4]
call edi
mov dword [ebp - 0x6c], eax
test eax, eax
jne 0x402287
mov edx, dword [ebp - 0x4c]
add esi, 0x10000
mov ecx, dword [ebp - 0x58]
lea eax, [edx + ecx]
cmp esi, eax
jb 0x402210
lea eax, [edx + ecx]
mov dword [ebp - 0x40], 0
push 0x1c
lea ecx, [ebp - 0x58]
push ecx
push eax
push dword [ebp - 4]
vpxor xmm0, xmm0, xmm0
vmovdqu xmmword [ebp - 0x58], xmm0
vmovq qword [ebp - 0x48], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jne 0x4021d1
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push dword [ebp - 0x10]
call fcn.00403eb5
add esp, 4
mov eax, dword [ebp - 0x3c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 8]
mov edi, eax
mov ecx, dword [ebp - 0xe8]
sub edi, edx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x28], 0
test ecx, ecx
je 0x4022cd
mov esi, dword [ebp - 0x20]
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 0xc]
push esi
lea eax, [eax + eax*4]
lea eax, [ebx + eax*4]
push eax
lea eax, [ecx + edx]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x402272
cmp dword [ebp - 0xc], esi
jb 0x402272
xor ecx, ecx
mov dword [ebp - 0x30], ecx
cmp dword [ebp + 0xc], ecx
jbe 0x40241c
lea eax, [ebx + 4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
lea edx, [edi + eax]
add eax, 4
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x10]
add eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp - 0x18]
mov ebx, dword [eax + ecx*4]
mov eax, dword [ebp - 0x14]
lea edx, [edx + eax]
sub esi, eax
je 0x402272
cmp esi, 0x7fffffff
ja 0x40240e
mov eax, 0x7ffffffe
mov dword [ebp - 0x24], ebx
sub eax, esi
mov dword [ebp - 0x2c], 0
sub dword [ebp - 0x24], edx
mov edi, esi
mov ecx, edx
mov dword [ebp - 0x68], eax
add eax, edi
je 0x402360
mov eax, dword [ebp - 0x24]
mov al, byte [ecx + eax]
test al, al
je 0x402354
mov byte [ecx], al
inc ecx
mov eax, dword [ebp - 0x68]
sub edi, 1
jne 0x402333
dec ecx
mov eax, 0x8007007a
jmp 0x402363
test edi, edi
jne 0x402360
dec ecx
mov eax, 0x8007007a
jmp 0x402363
mov eax, dword [ebp - 0x2c]
mov byte [ecx], 0
test eax, eax
js 0x402272
test edx, edx
je 0x402390
cmp esi, 2
jb 0x402390
cmp byte [edx], 0x3f
jne 0x402382
cmp byte [edx + 1], 0x3f
je 0x40238b
dec esi
inc edx
cmp esi, 2
jae 0x402377
jmp 0x402390
mov word [edx], 0x3233
mov edi, dword [ebp - 0x20]
lea ecx, [ebx + 1]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x34]
mov dword [edi - 4], esi
mov dword [edx - 4], 0x80000001
mov dword [edx], 0
lea eax, [esi + 8]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x14]
mov dword [edx + 4], 0x80000001
mov dword [edx + 8], 0
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], eax
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4023d6
sub ebx, ecx
add esi, 0x10
mov ecx, dword [ebp - 0x30]
add edx, 0x10
inc ecx
mov dword [ebp - 0x34], esi
add edi, 0x14
mov dword [ebp - 0x30], ecx
lea eax, [ebx + 4]
mov dword [ebp - 0x1c], edx
and eax, 0xfffffffc
mov dword [ebp - 0x20], edi
add dword [ebp - 0x14], eax
cmp ecx, dword [ebp + 0xc]
jae 0x402416
mov edx, dword [ebp - 0x10]
jmp 0x4022f5
mov byte [edx], 0
jmp 0x402272
mov edi, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push ecx
push ebx
push dword [ebp - 0x6c]
mov ebx, dword [ebp - 4]
push ebx
call esi
test eax, eax
je 0x402272
cmp dword [ebp - 0x90], 0
mov eax, dword [ebp - 0x18]
jne 0x402452
mov dword [ebp - 0x90], edi
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 8]
push 0x1c
mov dword [ebp - 0xe4], eax
lea eax, [ebp - 0x58]
push eax
vpxor xmm0, xmm0, xmm0
push ecx
mov dword [ebp - 0xe8], edi
mov edi, dword [ebp - 0x114]
push ebx
vmovdqu xmmword [ebp - 0x58], xmm0
vmovq qword [ebp - 0x48], xmm0
mov dword [ebp - 0x40], 0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x402272
test byte [ebp - 0x44], 0xf0
lea eax, [ebp - 0x28]
push eax
mov ecx, 0x40
mov eax, 4
cmovne eax, ecx
push eax
push edi
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push ebx
call edi
test eax, eax
je 0x402272
push 0
push 0x40
lea eax, [ebp - 0x1a8]
mov dword [ebp - 0x110], 0
push eax
push dword [ebp - 8]
push ebx
call esi
test eax, eax
je 0x402272
push 0
push 0xf8
lea eax, [ebp - 0x168]
push eax
mov eax, dword [ebp - 0x16c]
add eax, dword [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x402272
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x114]
push dword [ebp - 8]
push ebx
call edi
test eax, eax
je 0x402272
mov dword [ebp - 0x3c], 1
jmp 0x402272