Function at 0x421224
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x184
push edi
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov ecx, dword [ebp + 8]
call fcn.00495080
mov dword [ebp - 0x154], eax
cmp dword [ebp - 0x154], 0xffffffff
je 0x421254
cmp dword [ebp + 0xc], 0
jne 0x42125e
mov eax, 8
jmp 0x4216ee
mov ecx, dword [ebp + 0xc]
mov dl, byte [ecx]
shr dl, 4
and dl, 0xf
mov byte [ebp - 0x10c], dl
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x100], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx + 8]
mov dword [ebp - 0x110], edx
mov eax, dword [ebp + 0xc]
mov cl, byte [eax]
and cl, 0xf
and ecx, 0xff
mov dword [ebp - 0x108], ecx
cmp dword [ebp - 0x108], 0
je 0x4212bb
cmp dword [ebp - 0x108], 1
jne 0x4212cd
cmp dword [ebp - 0xfc], 0
je 0x4212cd
cmp dword [ebp - 0x110], 0
jne 0x4212d7
mov eax, 8
jmp 0x4216ee
mov dword [ebp - 0x15c], 0
mov word [ebp - 0x150], 0
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0x14e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0xf8], 0
mov ecx, 0x3d
xor eax, eax
lea edi, [ebp - 0xf4]
rep stosd dword es:[edi], eax
lea edx, [ebp - 0x150]
mov dword [ebp - 0x158], edx
lea eax, [ebp - 0xf8]
mov dword [ebp - 0x104], eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x15c]
push edx
push 0x40
mov eax, dword [ebp - 0x158]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x421377
cmp dword [ebp - 0x15c], 0x40
je 0x421375
mov eax, 6
jmp 0x4216ee
jmp 0x421381
mov eax, 6
jmp 0x4216ee
mov edx, dword [ebp - 0x158]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x5a4d
je 0x42139d
mov eax, 6
jmp 0x4216ee
push 0
push 0
mov ecx, dword [ebp - 0x158]
mov edx, dword [ecx + 0x3c]
push edx
mov eax, dword [ebp - 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x158]
cmp eax, dword [ecx + 0x3c]
je 0x4213cd
mov eax, 6
jmp 0x4216ee
push 0
lea edx, [ebp - 0x15c]
push edx
push 0xf8
mov eax, dword [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42140b
cmp dword [ebp - 0x15c], 0xf8
je 0x421409
mov eax, 6
jmp 0x4216ee
jmp 0x421415
mov eax, 6
jmp 0x4216ee
mov edx, dword [ebp - 0x104]
cmp dword [edx], 0x4550
jne 0x421433
mov eax, dword [ebp - 0x104]
xor ecx, ecx
mov cx, word [eax + 6]
test ecx, ecx
jne 0x42143d
mov eax, 6
jmp 0x4216ee
push 1
push 0
mov edx, dword [ebp - 0x104]
xor eax, eax
mov ax, word [edx + 0x14]
sub eax, 0xe0
push eax
mov ecx, dword [ebp - 0x154]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x104]
xor eax, eax
mov ax, word [edx + 6]
imul eax, eax, 0x28
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x17c], eax
mov ecx, dword [ebp - 0x17c]
mov dword [ebp - 0x160], ecx
cmp dword [ebp - 0x160], 0
jne 0x42149d
mov eax, 6
jmp 0x4216ee
push 0
lea edx, [ebp - 0x15c]
push edx
mov eax, dword [ebp - 0x104]
xor ecx, ecx
mov cx, word [eax + 6]
imul ecx, ecx, 0x28
push ecx
mov edx, dword [ebp - 0x160]
push edx
mov eax, dword [ebp - 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42168e
mov ecx, dword [ebp - 0x104]
xor edx, edx
mov dx, word [ecx + 6]
imul edx, edx, 0x28
cmp dword [ebp - 0x15c], edx
jne 0x42168e
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x184], eax
cmp dword [ebp - 0x184], 0
je 0x421510
cmp dword [ebp - 0x184], 1
je 0x42153a
jmp 0x42168e
mov ecx, dword [ebp - 0x10c]
and ecx, 0xff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x160]
mov eax, dword [ebp - 0x100]
add eax, dword [edx + ecx + 0x14]
mov dword [ebp - 0x100], eax
jmp 0x42168e
mov ecx, dword [ebp - 0x10c]
and ecx, 0xff
mov edx, dword [ebp - 0x104]
mov eax, dword [edx + ecx*8 + 0x78]
mov dword [ebp - 0x170], eax
mov dword [ebp - 0x174], 0
jmp 0x421571
mov ecx, dword [ebp - 0x174]
add ecx, 1
mov dword [ebp - 0x174], ecx
mov edx, dword [ebp - 0x104]
xor eax, eax
mov ax, word [edx + 6]
cmp dword [ebp - 0x174], eax
jae 0x42168e
mov ecx, dword [ebp - 0x104]
cmp dword [ecx + 0x38], 0
jne 0x4215a1
mov dword [ebp - 0x178], 0
jmp 0x4215c5
mov edx, dword [ebp - 0x174]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x160]
mov ecx, dword [ebp - 0x104]
mov eax, dword [eax + edx + 8]
xor edx, edx
div dword [ecx + 0x38]
mov dword [ebp - 0x178], edx
cmp dword [ebp - 0x178], 0
jne 0x4215e9
mov edx, dword [ebp - 0x174]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x160]
mov ecx, dword [eax + edx + 8]
mov dword [ebp - 0x178], ecx
jmp 0x421611
mov edx, dword [ebp - 0x174]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x160]
mov ecx, dword [eax + edx + 8]
mov edx, dword [ebp - 0x104]
add ecx, dword [edx + 0x38]
sub ecx, dword [ebp - 0x178]
mov dword [ebp - 0x178], ecx
mov eax, dword [ebp - 0x174]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x160]
mov edx, dword [ebp - 0x170]
cmp edx, dword [ecx + eax + 0xc]
jb 0x421689
mov eax, dword [ebp - 0x174]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x160]
mov edx, dword [ecx + eax + 0xc]
add edx, dword [ebp - 0x178]
cmp dword [ebp - 0x170], edx
jae 0x421689
mov eax, dword [ebp - 0x174]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x160]
mov edx, dword [ecx + eax + 0x14]
add edx, dword [ebp - 0x170]
mov eax, dword [ebp - 0x174]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x160]
sub edx, dword [ecx + eax + 0xc]
mov eax, dword [ebp - 0x100]
add eax, edx
mov dword [ebp - 0x100], eax
jmp 0x42168e
jmp 0x421562
mov ecx, dword [ebp - 0x160]
mov dword [ebp - 0x180], ecx
mov edx, dword [ebp - 0x180]
push edx
call fcn.004a90a8
add esp, 4
mov dword [ebp - 0x160], 0
mov eax, dword [ebp - 0x100]
mov dword [ebp - 0x16c], eax
mov cl, byte [ebp - 0x110]
mov byte [ebp - 0x168], cl
mov edx, dword [ebp - 0xfc]
mov dword [ebp - 0x164], edx
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x16c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00420f93
add esp, 0xc
pop edi
mov esp, ebp
pop ebp
ret