Function at 0x402640
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
push edi
mov edi, edx
mov esi, ecx
test edi, edi
je 0x402959
push 0xf8
lea eax, [ebp - 0x7ec]
push 0
push eax
call fcn.00404e20
add esp, 0xc
mov dword [ebp - 8], 0
lea eax, [ebp - 0x20]
vpxor xmm0, xmm0, xmm0
vmovdqu xmmword [ebp - 0x20], xmm0
push 0x1c
push eax
push edi
push esi
vmovq qword [ebp - 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x402959
push 0
push 0x40
lea eax, [ebp - 0x7c]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x402959
mov eax, 0x5a4d
cmp word [ebp - 0x7c], ax
jne 0x402952
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x14]
ja 0x402952
cmp eax, 0x40
jb 0x402952
push 0
push 0xf8
lea ecx, [ebp - 0x7ec]
add eax, edi
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x402959
cmp dword [ebp - 0x7ec], 0x4550
jne 0x402952
mov eax, dword [ebp - 0x40]
add eax, edi
je 0x402959
push 0x678
lea eax, [ebp - 0x6f4]
push 0
push eax
call fcn.00404e20
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 0x6d8]
add esp, 0xc
mov dword [ebp - 0x6f4], 0x678
mov dword [ebp - 0x6e4], edi
mov dword [ebp - 0x6f0], 0x40
push 0
push 0x40
push eax
push edi
push esi
call ebx
test eax, eax
je 0x402960
mov eax, dword [ebp - 0x69c]
lea ecx, [ebp - 0x698]
add eax, dword [ebp - 0x6e4]
push 0
push 0x18
push ecx
push eax
push esi
mov dword [ebp - 0x6e0], eax
mov dword [ebp - 0x6ec], 0x18
call ebx
test eax, eax
je 0x402960
movzx eax, word [ebp - 0x692]
lea ecx, [eax + eax*4]
movzx eax, word [ebp - 0x684]
lea eax, [eax + ecx*8]
add eax, 0x18
mov dword [ebp - 0x6ec], eax
cmp eax, 0x608
ja 0x402960
push 0
push eax
lea eax, [ebp - 0x698]
push eax
push dword [ebp - 0x6e0]
push esi
call ebx
test eax, eax
je 0x402960
mov ax, word [ebp - 0x680]
mov ecx, 0x10b
cmp ax, cx
jne 0x402807
mov eax, dword [ebp - 0x5b0]
test eax, eax
je 0x40282e
cmp dword [ebp - 0x5ac], 0
je 0x40282e
add eax, edi
mov dword [ebp - 0x6dc], eax
jmp 0x402834
mov ecx, 0x20b
cmp ax, cx
jne 0x40282e
mov eax, dword [ebp - 0x5a0]
test eax, eax
je 0x40282e
cmp dword [ebp - 0x59c], 0
je 0x40282e
add eax, edi
mov dword [ebp - 0x6dc], eax
jmp 0x402834
mov eax, dword [ebp - 0x6dc]
test eax, eax
je 0x402859
push 0
push 0x14
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x6e8], 0x14
push ecx
push eax
push esi
call ebx
test eax, eax
je 0x402960
cmp dword [ebp + 8], 0
je 0x40293f
push dword [ebp + 0x10]
mov edx, edi
mov ecx, esi
push dword [ebp + 0xc]
call fcn.00401ec0
add esp, 8
test eax, eax
je 0x402960
mov edi, dword [ebp - 0x6dc]
test edi, edi
je 0x402921
mov eax, dword [ebp - 0x80]
vmovdqu xmm0, xmmword [ebp - 0x90]
and eax, 0xfffffffe
mov dword [ebp - 0x24], 0
push 0x1c
mov dword [ebp - 8], eax
lea eax, [ebp - 0x3c]
push eax
vmovdqu xmmword [ebp - 0x18], xmm0
vpxor xmm0, xmm0, xmm0
push edi
push esi
vmovdqu xmmword [ebp - 0x3c], xmm0
vmovq qword [ebp - 0x2c], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x402960
test byte [ebp - 0x28], 0xf0
lea eax, [ebp + 8]
push eax
mov ecx, 4
mov eax, 0x40
cmove eax, ecx
push eax
push 0x14
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push esi
call edi
test eax, eax
je 0x402960
push 0
push 0x14
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x6dc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402960
lea eax, [ebp + 8]
push eax
push dword [ebp + 8]
push 0x14
push dword [ebp - 0x6dc]
push esi
call edi
test eax, eax
je 0x402960
push ecx
lea eax, [ebp - 0x6f4]
mov ecx, esi
push eax
call fcn.00402970
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0xc1
call ebx
push 0x10dd
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc