Function at 0x412b20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx]
cmp edx, 0x5a4d
je 0x412b44
xor eax, eax
jmp 0x412cf8
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp dword [edx], 0x4550
je 0x412b62
xor eax, eax
jmp 0x412cf8
mov ecx, dword [ebp - 0x18]
call fcn.00412930
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x3c]
sub eax, 0x40
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x18], eax
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x1c], 0x40
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x14], 0
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x18]
and edx, 0x80000000
jne 0x412bbf
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x14], ecx
push pe_nt_image_headers32
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x18]
add ecx, 0x20
push ecx
call fcn.004030a0
add esp, 0xc
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + 0x3c]
add ecx, 0xf8
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x18]
movzx eax, word [edx + 0x26]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
jmp 0x412c05
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x10]
jae 0x412c39
push 0x28
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
imul ecx, ecx, 0x28
add eax, ecx
push eax
mov edx, dword [ebp - 0xc]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
lea ecx, [eax + edx + 0x118]
push ecx
call fcn.004030a0
add esp, 0xc
jmp 0x412bfc
mov dword [ebp - 0xc], 0
jmp 0x412c4b
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x10]
jae 0x412caa
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0xc]
mov byte [ecx + 0x488], 0
cmp dword [ebp + 0x14], 0
je 0x412c88
mov edx, dword [ebp - 0xc]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + edx + 0x124]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
mov dword [eax + edx*4 + 0x438], ecx
jmp 0x412ca8
mov ecx, dword [ebp - 0xc]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
add eax, dword [edx + ecx + 0x12c]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
mov dword [edx + ecx*4 + 0x438], eax
jmp 0x412c42
cmp dword [ebp + 0xc], 0
jne 0x412cd9
mov eax, dword [ebp - 0xc]
sub eax, 1
imul eax, eax, 0x28
mov ecx, dword [ebp - 0xc]
sub ecx, 1
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + eax + 0x12c]
mov edx, dword [ebp - 0x18]
add eax, dword [edx + ecx + 0x128]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0x10]
mov dword [ecx + 8], edx
mov eax, 1
mov esp, ebp
pop ebp
ret 0x10