Function at 0x4012a0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b4
mov eax, dword [0x431004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x40
mov dword [ebp - 0x194], eax
mov edi, edx
lea eax, [ebp - 0x170]
mov dword [ebp - 0x178], edi
mov esi, ecx
mov dword [ebp - 0x1a4], 0
push 0
push eax
mov dword [ebp - 0x174], esi
call fcn.004090e0
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 8]
add esp, 0xc
push eax
push 0x40
lea eax, [ebp - 0x170]
push eax
push edi
push esi
call ebx
test eax, eax
je 0x40168a
cmp dword [ebp - 8], 0x40
jb 0x40168a
push pe_nt_image_headers32
lea eax, [ebp - 0x130]
push 0
push eax
call fcn.004090e0
add esp, 0xc
lea eax, [ebp - 8]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x130]
push eax
mov eax, dword [ebp - 0x134]
add eax, edi
push eax
push esi
call ebx
test eax, eax
je 0x40168a
cmp dword [ebp - 8], 0xf8
jb 0x40168a
mov eax, 0x10b
cmp word [ebp - 0x118], ax
je 0x401389
push 9
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x1a4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405785
mov esp, ebp
pop ebp
ret
movzx ecx, word [ebp - 0x11c]
xor edi, edi
mov eax, dword [ebp - 0x134]
add ecx, 0x18
add eax, ecx
mov dword [ebp - 0x60], 0
xor ecx, ecx
mov dword [ebp - 0x5c], 0
cmp cx, word [ebp - 0x12a]
jae 0x401434
mov ebx, dword [ebp - 0x178]
add ebx, eax
nop
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 0x40168a
cmp dword [ebp - 8], 0x28
jb 0x40168a
cmp dword [ebp - 0x58], 0
mov edx, dword [ebp - 0xb0]
jne 0x40141d
mov ecx, dword [ebp - 0x28]
cmp edx, ecx
jb 0x40141d
mov esi, dword [ebp - 0x24]
lea eax, [esi + ecx]
cmp edx, eax
jae 0x401417
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], esi
mov esi, dword [ebp - 0x174]
movzx eax, word [ebp - 0x12a]
inc edi
add ebx, 0x28
cmp edi, eax
jb 0x4013c0
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
jmp 0x40143a
mov edx, dword [ebp - 0xb0]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test edx, edx
je 0x4014ca
cmp dword [ebp - 0xac], 0
jne 0x4014ca
mov esi, dword [ebp - 0x178]
lea eax, [ebp - 0x20]
push 0
push 0x14
push eax
add esi, edx
push esi
push dword [ebp - 0x174]
call ebx
test eax, eax
je 0x40168a
add dword [ebp - 0xac], 0x14
cmp dword [ebp - 0x14], 0
je 0x4014ae
push 0
push 0x14
lea eax, [ebp - 0x20]
add esi, 0x14
push eax
push esi
push dword [ebp - 0x174]
call ebx
test eax, eax
jne 0x401472
mov eax, dword [ebp - 0x1a4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405785
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 0x4014ca
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, 0xcccccccd
mul dword [ebp - 0xac]
shr edx, 4
lea eax, [edx + edx*4]
shl eax, 2
mov dword [ebp - 0x18c], eax
add eax, 0x14
cmp eax, 0x14
jb 0x40168a
lea ecx, [eax + 7]
and ecx, 0xfffffff8
mov dword [ebp - 0x188], ecx
cmp ecx, eax
jb 0x40168a
lea edx, [ecx + 0x10]
mov dword [ebp - 0x180], edx
cmp edx, ecx
jb 0x40168a
mov ebx, edx
xor edx, edx
nop dword [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 0x401530
sub ecx, esi
lea eax, [ecx + 4]
and eax, 0xfffffffc
add eax, ebx
cmp eax, ebx
jb 0x40168a
inc edx
mov ebx, eax
mov dword [ebp - 0x184], ebx
cmp edx, 1
jb 0x401520
push ebx
call fcn.00405798
add esp, 4
mov dword [ebp - 0x17c], eax
push ebx
push 0
push eax
call fcn.004090e0
mov edx, dword [ebp - 0x178]
lea eax, [ebp - 0x28]
mov ebx, dword [ebp - 0x10c]
add esp, 0xc
add ebx, edx
mov dword [ebp - 0x10], 0
add ebx, dword [ebp - 0x110]
xorps xmm0, xmm0
add ebx, dword [ebp - 0x114]
add ebx, dword [ebp - 0x104]
push 0x1c
cmp edx, ebx
movq qword [ebp - 0x18], xmm0
push eax
cmovae ebx, edx
push ebx
push dword [ebp - 0x174]
movups xmmword [ebp - 0x28], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x40167a
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
nop dword [eax + eax]
mov edx, dword [ebp - 0x1c]
mov eax, edx
and eax, 0xfff
cmp eax, 0xfff
je 0x40167c
cmp dword [ebp - 0x18], 0x10000
mov ecx, dword [ebp - 0x28]
jne 0x401643
cmp ecx, ebx
lea eax, [edx + ecx]
mov esi, ebx
cmova esi, ecx
add esi, 0xffff
and esi, 0xffff0000
cmp esi, eax
jae 0x401643
nop dword [eax + eax]
push 4
push 0x3000
push dword [ebp - 0x184]
push esi
push dword [ebp - 0x174]
call edi
mov dword [ebp - 0x1b0], eax
test eax, eax
jne 0x4016a1
mov edx, dword [ebp - 0x1c]
add esi, 0x10000
mov ecx, dword [ebp - 0x28]
lea eax, [edx + ecx]
cmp esi, eax
jb 0x401610
lea eax, [edx + ecx]
mov dword [ebp - 0x10], 0
push 0x1c
lea ecx, [ebp - 0x28]
xorps xmm0, xmm0
push ecx
push eax
push dword [ebp - 0x174]
movups xmmword [ebp - 0x28], xmm0
movq qword [ebp - 0x18], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jne 0x4015d0
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push dword [ebp - 0x17c]
call fcn.00405793
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1a4]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00405785
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x178]
mov ebx, eax
mov ecx, dword [ebp - 0xb0]
sub ebx, edx
mov dword [ebp - 0x190], ebx
mov dword [ebp - 0xc], 0
test ecx, ecx
je 0x4016f0
mov esi, dword [ebp - 0x18c]
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x17c]
push esi
add eax, 0x14
push eax
lea eax, [ecx + edx]
push eax
push dword [ebp - 0x174]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x40167c
cmp dword [ebp - 8], esi
jb 0x40167c
mov esi, dword [ebp - 0x17c]
xor ecx, ecx
mov dword [ebp - 0x19c], ecx
lea eax, [esi + 4]
mov dword [ebp - 0x18c], eax
mov eax, dword [ebp - 0x188]
lea edx, [ebx + eax]
add eax, 4
add eax, esi
mov dword [ebp - 0x1a0], edx
mov dword [ebp - 0x188], eax
mov eax, dword [ebp - 0x194]
mov ebx, dword [eax + ecx*4]
lea eax, [eax + ecx*4]
mov edx, dword [ebp - 0x184]
mov dword [ebp - 0x1ac], eax
mov eax, dword [ebp - 0x180]
lea ecx, [esi + eax]
sub edx, eax
je 0x4019ba
cmp edx, 0x7fffffff
ja 0x4019ba
mov eax, 0x7ffffffe
mov dword [ebp - 0x198], 0
sub eax, edx
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x1a8], eax
sub ebx, ecx
add eax, edi
je 0x4017a0
mov al, byte [esi + ebx]
test al, al
je 0x401794
mov byte [esi], al
inc esi
mov eax, dword [ebp - 0x1a8]
sub edi, 1
jne 0x401773
dec esi
mov eax, 0x8007007a
jmp 0x4017a6
test edi, edi
jne 0x4017a0
dec esi
mov eax, 0x8007007a
jmp 0x4017a6
mov eax, dword [ebp - 0x198]
mov byte [esi], 0
test eax, eax
js 0x40167c
test ecx, ecx
je 0x4017d9
cmp edx, 2
jb 0x4017d9
nop word [eax + eax]
cmp byte [ecx], 0x3f
jne 0x4017cb
cmp byte [ecx + 1], 0x3f
je 0x4017d4
dec edx
inc ecx
cmp edx, 2
jae 0x4017c0
jmp 0x4017d9
mov word [ecx], 0x3233
mov esi, dword [ebp - 0x18c]
mov edi, dword [ebp - 0x188]
mov ebx, dword [ebp - 0x1a0]
mov ecx, dword [ebp - 0x1ac]
mov dword [esi - 4], ebx
mov dword [edi - 4], 0x80000001
mov dword [edi], 0
lea eax, [ebx + 8]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x190]
add eax, dword [ebp - 0x180]
mov dword [edi + 4], 0x80000001
mov dword [edi + 8], 0
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], eax
mov ecx, dword [ecx]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401836
sub ecx, edx
add esi, 0x14
mov edx, dword [ebp - 0x180]
add ebx, 0x10
add edi, 0x10
mov dword [ebp - 0x18c], esi
mov esi, dword [ebp - 0x17c]
lea eax, [ecx + 4]
mov dword [ebp - 0x1a0], ebx
mov ecx, dword [ebp - 0x19c]
and eax, 0xfffffffc
inc ecx
mov dword [ebp - 0x188], edi
add edx, eax
mov dword [ebp - 0x19c], ecx
mov dword [ebp - 0x180], edx
cmp ecx, 1
jb 0x401721
mov ebx, dword [ebp - 0x174]
mov eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push edx
push eax
push dword [ebp - 0x1b0]
push ebx
call esi
test eax, eax
je 0x40167c
cmp dword [ebp - 0x58], 0
jne 0x4018c7
mov eax, dword [ebp - 0x190]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x184]
mov dword [ebp - 0x54], eax
jmp 0x4018cd
mov eax, dword [ebp - 0x184]
mov ecx, dword [ebp - 0x190]
xorps xmm0, xmm0
mov edi, dword [ebp - 0xdc]
push 0x1c
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x178]
mov dword [ebp - 0xb0], ecx
push ebx
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x10], 0
movq qword [ebp - 0x18], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x40167c
test byte [ebp - 0x14], 0xf0
lea eax, [ebp - 0xc]
push eax
mov ecx, 0x40
mov eax, 4
cmovne eax, ecx
push eax
push edi
push dword [ebp - 0x178]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push ebx
call edi
test eax, eax
je 0x40167c
push 0
push 0x40
lea eax, [ebp - 0x170]
mov dword [ebp - 0xd8], 0
push eax
push dword [ebp - 0x178]
push ebx
call esi
test eax, eax
je 0x40167c
push 0
push pe_nt_image_headers32
lea eax, [ebp - 0x130]
push eax
mov eax, dword [ebp - 0x134]
add eax, dword [ebp - 0x178]
push eax
push ebx
call esi
test eax, eax
je 0x40167c
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0xdc]
push dword [ebp - 0x178]
push ebx
call edi
test eax, eax
je 0x40167c
mov dword [ebp - 0x1a4], 1
jmp 0x40167c
test edx, edx
je 0x40167c
mov byte [ecx], 0
jmp 0x40167c