Function at 0x10004020
Capabilities:
Parse pe header

Disassembly:
mov eax, dword [0x52e6798]
test eax, eax
jne 0x1000402e
call fcn.10003ec0
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
test ebx, ebx
push edi
je 0x10004328
mov edi, dword [0x52c10b4]
push 0x40
push ebx
call edi
cmp eax, 1
je 0x10004328
cmp word [ebx], 0x5a4d
jne 0x10004328
mov esi, dword [ebx + 0x3c]
push 0xf8
add esi, ebx
push esi
call edi
cmp eax, 1
je 0x10004328
cmp dword [esi], 0x4550
jne 0x10004328
cmp word [esi + 0x14], 0xe0
jne 0x1000431c
cmp word [esi + 0x18], 0x10b
jne 0x1000431c
cmp word [esi + 6], 1
jb 0x10004328
mov eax, dword [ebx + 0x3c]
mov eax, dword [eax + ebx + 0x80]
test eax, eax
je 0x10004310
add eax, ebx
lea ebp, [eax + 0xc]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x100040ca
cmp dword [ebp], 0
je 0x10004304
mov esi, dword [ebp]
push 0x52cf35c
add esi, ebx
xor edi, edi
call dword [0x52c1080]
push eax
push 0x52cf35c
push esi
call fcn.10030b26
add esp, 0xc
test eax, eax
jne 0x100040f4
mov edi, 1
push 0x52cf36c
call dword [0x52c1080]
push eax
push 0x52cf36c
push esi
call fcn.10030b26
add esp, 0xc
test eax, eax
jne 0x10004117
mov edi, 2
mov ecx, dword [ebp + 4]
lea edx, [ecx + ebx]
mov eax, edx
mov ecx, dword [edx]
test ecx, ecx
je 0x100042fc
test ecx, 0x80000000
jne 0x100042e7
cmp edi, 1
jne 0x100042e7
mov ecx, dword [eax]
mov esi, dword [0x52e67f4]
cmp ecx, esi
jne 0x10004150
mov dword [eax], 0x5292a40
mov ecx, dword [eax]
mov esi, dword [0x52e67f0]
cmp ecx, esi
jne 0x10004162
mov dword [eax], 0x5292ca0
mov ecx, dword [eax]
mov esi, dword [0x52e67ec]
cmp ecx, esi
jne 0x10004174
mov dword [eax], 0x5292490
mov ecx, dword [eax]
mov esi, dword [0x52e67c0]
cmp ecx, esi
jne 0x10004186
mov dword [eax], 0x5292340
mov ecx, dword [eax]
mov esi, dword [0x52e67bc]
cmp ecx, esi
jne 0x10004198
mov dword [eax], 0x5292210
mov ecx, dword [eax]
mov esi, dword [0x52e67a4]
cmp ecx, esi
jne 0x100041aa
mov dword [eax], 0x5293880
mov ecx, dword [eax]
mov esi, dword [0x52e67a0]
cmp ecx, esi
jne 0x100041bc
mov dword [eax], 0x5293940
mov ecx, dword [eax]
mov esi, dword [0x52e67a8]
cmp ecx, esi
jne 0x100041ce
mov dword [eax], 0x5292f00
cmp byte [esp + 0x18], 1
jae 0x100042e7
mov ecx, dword [eax]
mov esi, dword [0x52e67e8]
cmp ecx, esi
jne 0x100041eb
mov dword [eax], 0x52925c0
mov ecx, dword [eax]
mov esi, dword [0x52e67e4]
cmp ecx, esi
jne 0x100041fd
mov dword [eax], 0x5292650
mov ecx, dword [eax]
mov esi, dword [0x52e67e0]
cmp ecx, esi
jne 0x1000420f
mov dword [eax], 0x52925e0
mov ecx, dword [eax]
mov esi, dword [0x52e67dc]
cmp ecx, esi
jne 0x10004221
mov dword [eax], 0x5292f70
mov ecx, dword [eax]
mov esi, dword [0x52e67d8]
cmp ecx, esi
jne 0x10004233
mov dword [eax], 0x5293000
mov ecx, dword [eax]
mov esi, dword [0x52e67d4]
cmp ecx, esi
jne 0x10004245
mov dword [eax], 0x5292f90
mov ecx, dword [eax]
mov esi, dword [0x52e67d0]
cmp ecx, esi
jne 0x10004257
mov dword [eax], 0x5293080
mov ecx, dword [eax]
mov esi, dword [0x52e67cc]
cmp ecx, esi
jne 0x10004269
mov dword [eax], 0x5293120
mov ecx, dword [eax]
mov esi, dword [0x52e67c8]
cmp ecx, esi
jne 0x1000427b
mov dword [eax], 0x5292e90
mov ecx, dword [eax]
mov esi, dword [0x52e67c4]
cmp ecx, esi
jne 0x1000428d
mov dword [eax], 0x5292e30
mov ecx, dword [eax]
mov esi, dword [0x52e67b8]
cmp ecx, esi
jne 0x1000429f
mov dword [eax], 0x52931c0
mov ecx, dword [eax]
mov esi, dword [0x52e67b4]
cmp ecx, esi
jne 0x100042b1
mov dword [eax], 0x5293220
mov ecx, dword [eax]
mov esi, dword [0x52e67b0]
cmp ecx, esi
jne 0x100042c3
mov dword [eax], 0x5293280
mov ecx, dword [eax]
mov esi, dword [0x52e67ac]
cmp ecx, esi
jne 0x100042d5
mov dword [eax], 0x5293320
mov ecx, dword [eax]
mov esi, dword [0x52e679c]
cmp ecx, esi
jne 0x100042e7
mov dword [eax], 0x52933c0
test eax, eax
je 0x10004328
mov ecx, dword [edx + 4]
add edx, 4
add eax, 4
test ecx, ecx
jne 0x10004129
add ebp, 0x14
jmp 0x100040b9
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 8
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
ret 8
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8