Function at 0x40a1f3
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push esi
push edi
push 0x48
lea eax, [ebp - 0x48]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push 2
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x48]
push esi
push eax
mov dword [ebp - 0x38], esi
call fcn.0040a197
add esp, 0x18
test eax, eax
je 0x40a235
mov eax, 0x5a4d
cmp word [esi], ax
je 0x40a235
or dword [ebp - 0x48], 0xffffffff
push 4
add esi, 0x3c
lea eax, [ebp - 0x48]
push esi
push eax
call fcn.0040a197
add esp, 0xc
test eax, eax
je 0x40a25f
mov eax, dword [esi]
test al, 3
je 0x40a257
or dword [ebp - 0x48], 0xffffffff
jmp 0x40a25f
mov ecx, dword [ebp - 0x38]
add eax, ecx
mov dword [ebp - 0x34], eax
push 4
push dword [ebp - 0x34]
lea eax, [ebp - 0x48]
push eax
call fcn.0040a197
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x34]
je 0x40a283
cmp dword [eax], 0x4550
je 0x40a283
or dword [ebp - 0x48], 0xffffffff
add eax, 0x14
push 2
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040a197
add esp, 0xc
test eax, eax
je 0x40a477
mov eax, dword [ebp - 0x34]
movzx ecx, word [eax + 6]
movzx edx, word [eax + 0x14]
push ebx
mov dword [ebp - 0x20], ecx
test ecx, ecx
je 0x40a472
test dl, 3
jne 0x40a472
cmp edx, 0xe0
jb 0x40a472
movzx ecx, word [eax + 0x18]
mov esi, 0x10b
mov ebx, esi
mov edi, 0x20b
cmp cx, bx
je 0x40a2e9
mov ebx, edi
cmp cx, bx
jne 0x40a472
cmp cx, di
jne 0x40a2fa
cmp edx, 0xf0
jb 0x40a472
lea edx, [eax + edx + 0x18]
add eax, 0x60
mov dword [ebp - 0x2c], edx
cmp cx, si
jne 0x40a32b
push 0x98
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040a197
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x34]
je 0x40a35a
cmp dword [eax + 0x74], 0x10
lea ecx, [eax + 0x78]
jmp 0x40a351
push 0xa8
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040a197
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x34]
je 0x40a35a
cmp dword [eax + 0x84], 0x10
lea ecx, [eax + 0x88]
mov dword [ebp - 0x30], ecx
jae 0x40a35a
or dword [ebp - 0x48], 0xffffffff
xor ebx, ebx
cmp dword [ebp - 0x48], ebx
jne 0x40a476
mov esi, dword [eax + 0x3c]
mov edi, dword [eax + 0x38]
push esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], edi
call fcn.0040a1d6
pop ecx
cmp eax, 1
jne 0x40a472
add esi, 0xfffffffc
cmp esi, 0x3ffc
ja 0x40a472
push edi
call fcn.0040a1d6
pop ecx
cmp eax, 1
jne 0x40a472
cmp edi, 4
jb 0x40a472
cmp edi, 0x4000
ja 0x40a472
mov eax, dword [ebp - 0x20]
imul eax, eax, 0x28
add eax, dword [ebp - 0x2c]
push 0x28
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040a197
add esp, 0xc
test eax, eax
je 0x40a472
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax + 0x10]
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], ecx
cmp dword [eax + 0x14], ebx
jne 0x40a3ef
mov dword [ebp - 0x18], ebx
mov dword [ebp + 8], ebx
cmp edx, ebx
jbe 0x40a45e
mov ecx, dword [ebp - 0x2c]
add ecx, 0x14
mov edx, dword [ecx]
mov eax, dword [ecx - 4]
mov esi, dword [ecx - 8]
lea edi, [eax + edx]
lea ebx, [esi + eax]
cmp edi, edx
jb 0x40a41c
cmp edi, 0xffffffff
ja 0x40a41c
cmp ebx, esi
jb 0x40a41c
cmp ebx, 0xffffffff
jbe 0x40a420
or dword [ebp - 0x48], 0xffffffff
cmp ebx, dword [ebp + 0xc]
jbe 0x40a428
mov dword [ebp + 0xc], ebx
lea edi, [eax + edx]
cmp edi, dword [ebp - 0xc]
jbe 0x40a433
mov dword [ebp - 0xc], edi
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
je 0x40a44b
cmp esi, dword [ebp - 0x18]
jne 0x40a44b
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
inc dword [ebp + 8]
mov edx, dword [ebp - 0x20]
add ecx, 0x28
cmp dword [ebp + 8], edx
jb 0x40a3fc
cmp dword [ebp - 0x1c], edx
jne 0x40a476
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ebx
jmp 0x40a476
or dword [ebp - 0x48], 0xffffffff
pop ebx
mov edi, dword [ebp + 0x10]
push 0x12
pop ecx
lea esi, [ebp - 0x48]
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
leave
ret