Function at 0x10004020
Capabilities:
Parse pe header

Disassembly:
mov eax, dword [0x5150768]
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 0x10004320
mov edi, dword [0x51310b4]
push 0x40
push ebx
call edi
cmp eax, 1
je 0x10004320
cmp word [ebx], 0x5a4d
jne 0x10004320
mov esi, dword [ebx + 0x3c]
push 0xf8
add esi, ebx
push esi
call edi
cmp eax, 1
je 0x10004320
cmp dword [esi], 0x4550
jne 0x10004320
cmp word [esi + 0x14], 0xe0
jne 0x10004314
cmp word [esi + 0x18], 0x10b
jne 0x10004314
cmp word [esi + 6], 1
jb 0x10004320
mov eax, dword [ebx + 0x3c]
mov eax, dword [eax + ebx + 0x80]
test eax, eax
je 0x10004308
add eax, ebx
lea ebp, [eax + 0xc]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x100040ca
cmp dword [ebp], 0
je 0x100042fc
mov esi, dword [ebp]
xor edi, edi
add esi, ebx
push esi
call dword [0x5131080]
push eax
push 0x513f35c
push esi
call fcn.10030a06
add esp, 0xc
test eax, eax
jne 0x100040f0
mov edi, 1
push esi
call dword [0x5131080]
push eax
push 0x513f36c
push esi
call fcn.10030a06
add esp, 0xc
test eax, eax
jne 0x1000410f
mov edi, 2
mov ecx, dword [ebp + 4]
lea edx, [ecx + ebx]
mov eax, edx
mov ecx, dword [edx]
test ecx, ecx
je 0x100042f4
test ecx, 0x80000000
jne 0x100042df
cmp edi, 1
jne 0x100042df
mov ecx, dword [eax]
mov esi, dword [0x51507c4]
cmp ecx, esi
jne 0x10004148
mov dword [eax], 0x5102a40
mov ecx, dword [eax]
mov esi, dword [0x51507c0]
cmp ecx, esi
jne 0x1000415a
mov dword [eax], 0x5102ca0
mov ecx, dword [eax]
mov esi, dword [0x51507bc]
cmp ecx, esi
jne 0x1000416c
mov dword [eax], 0x5102490
mov ecx, dword [eax]
mov esi, dword [0x5150790]
cmp ecx, esi
jne 0x1000417e
mov dword [eax], 0x5102340
mov ecx, dword [eax]
mov esi, dword [0x515078c]
cmp ecx, esi
jne 0x10004190
mov dword [eax], 0x5102210
mov ecx, dword [eax]
mov esi, dword [0x5150774]
cmp ecx, esi
jne 0x100041a2
mov dword [eax], 0x5103880
mov ecx, dword [eax]
mov esi, dword [0x5150770]
cmp ecx, esi
jne 0x100041b4
mov dword [eax], 0x5103940
mov ecx, dword [eax]
mov esi, dword [0x5150778]
cmp ecx, esi
jne 0x100041c6
mov dword [eax], 0x5102f00
cmp byte [esp + 0x18], 1
jae 0x100042df
mov ecx, dword [eax]
mov esi, dword [0x51507b8]
cmp ecx, esi
jne 0x100041e3
mov dword [eax], 0x51025c0
mov ecx, dword [eax]
mov esi, dword [0x51507b4]
cmp ecx, esi
jne 0x100041f5
mov dword [eax], 0x5102650
mov ecx, dword [eax]
mov esi, dword [0x51507b0]
cmp ecx, esi
jne 0x10004207
mov dword [eax], 0x51025e0
mov ecx, dword [eax]
mov esi, dword [0x51507ac]
cmp ecx, esi
jne 0x10004219
mov dword [eax], 0x5102f70
mov ecx, dword [eax]
mov esi, dword [0x51507a8]
cmp ecx, esi
jne 0x1000422b
mov dword [eax], 0x5103000
mov ecx, dword [eax]
mov esi, dword [0x51507a4]
cmp ecx, esi
jne 0x1000423d
mov dword [eax], 0x5102f90
mov ecx, dword [eax]
mov esi, dword [0x51507a0]
cmp ecx, esi
jne 0x1000424f
mov dword [eax], 0x5103080
mov ecx, dword [eax]
mov esi, dword [0x515079c]
cmp ecx, esi
jne 0x10004261
mov dword [eax], 0x5103120
mov ecx, dword [eax]
mov esi, dword [0x5150798]
cmp ecx, esi
jne 0x10004273
mov dword [eax], 0x5102e90
mov ecx, dword [eax]
mov esi, dword [0x5150794]
cmp ecx, esi
jne 0x10004285
mov dword [eax], 0x5102e30
mov ecx, dword [eax]
mov esi, dword [0x5150788]
cmp ecx, esi
jne 0x10004297
mov dword [eax], 0x51031c0
mov ecx, dword [eax]
mov esi, dword [0x5150784]
cmp ecx, esi
jne 0x100042a9
mov dword [eax], 0x5103220
mov ecx, dword [eax]
mov esi, dword [0x5150780]
cmp ecx, esi
jne 0x100042bb
mov dword [eax], 0x5103280
mov ecx, dword [eax]
mov esi, dword [0x515077c]
cmp ecx, esi
jne 0x100042cd
mov dword [eax], 0x5103320
mov ecx, dword [eax]
mov esi, dword [0x515076c]
cmp ecx, esi
jne 0x100042df
mov dword [eax], 0x51033c0
test eax, eax
je 0x10004320
mov ecx, dword [edx + 4]
add edx, 4
add eax, 4
test ecx, ecx
jne 0x10004121
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