Function at 0x4067b0
Capabilities:
Map section object
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x434
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x430], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov edi, ecx
mov byte [esp + 0x26], 0
mov ecx, dword [ebp + 0xc]
push eax
mov dword [esp + 0x30], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
add edi, 0xd8
cmp ebx, 0xffffffff
je 0x406829
push 0
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
push 0x40
lea eax, [esp + 0x2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40684c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov cl, byte [esp + 0xe]
mov dword [edi], 0
pop edi
mov al, cl
mov ecx, dword [esp + 0x438]
pop esi
pop ebx
xor ecx, esp
call fcn.00418bcb
mov esp, ebp
pop ebp
ret 8
mov eax, 0x5a4d
cmp word [esp + 0x20], ax
jne 0x406822
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push dword [esp + 0x64]
push ebx
call esi
test eax, eax
je 0x406822
push 0
lea eax, [esp + 0x1c]
push eax
push 0x108
lea eax, [esp + 0x6c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406822
cmp dword [esp + 0x60], 0x4550
jne 0x406822
movzx eax, word [esp + 0x64]
cmp eax, 0x14c
je 0x4068b3
cmp eax, 0x8664
jne 0x406822
mov eax, dword [esp + 0x90]
jmp 0x4068ba
mov eax, dword [esp + 0x94]
push 0
push 0
push 0
push ebx
mov dword [edi], eax
call esi
push 0
push 0
push 0
push 0x1000002
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x406acf
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x168]
push eax
mov dword [esp + 0x16c], 0x1003f
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x406ac5
push 0
push 4
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x218]
add eax, 8
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x406ac5
mov eax, dword [esp + 0x10]
cmp eax, dword [edi]
jne 0x406943
mov byte [esp + 0xe], 1
jmp 0x406ac5
push eax
push dword [esi]
call dword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
test eax, eax
jne 0x406ac5
push 2
push 0
push 2
mov dword [esp + 0x28], eax
mov eax, dword [edi]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push dword [esi]
push dword [esp + 0x3c]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
cmp eax, 0xc0000018
jne 0x4069b1
push 2
push 0
push 2
lea eax, [esp + 0x28]
mov dword [esp + 0x1c], 0
push eax
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push dword [esi]
push dword [esp + 0x3c]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
test eax, eax
je 0x4069c0
cmp eax, 0x40000003
jne 0x406ac5
push 0
push 4
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x218]
add eax, 8
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, dword [esp + 0x14]
mov esi, eax
push dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx]
call fcn.004064c0
add esp, 4
test esi, esi
je 0x406ac5
test al, al
je 0x406ac5
mov ecx, dword [esp + 0x10]
cmp dword [edi], ecx
mov eax, dword [esp + 0x88]
mov esi, dword [esp + 0x14]
sete byte [esp + 0xf]
add eax, ecx
mov dword [edi], ecx
mov dword [esp + 0x218], eax
lea eax, [esp + 0x168]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x406ac5
mov al, byte [esp + 0xf]
mov byte [esp + 0xe], al
mov eax, dword [0x4abbe4]
mov dword [esp + 0x14], 0
test al, 1
jne 0x406a7d
push str.IsWow64Process
or eax, 1
push str.kernel32.dll
mov dword [0x4abbe4], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4abbe8], eax
jmp 0x406a82
mov eax, dword [0x4abbe8]
test eax, eax
je 0x406a98
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x4abbe8]
cmp dword [esp + 0x14], 0
je 0x406ac5
push 0
push 4
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x218]
add eax, 0xfffff010
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
neg eax
sbb al, al
and byte [esp + 0xe], al
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov cl, byte [esp + 0xe]
test cl, cl
je 0x40682d
jmp 0x406833