Function at 0x10004120
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
cmp dword [0x100536e8], 0
push ebx
push esi
push edi
jne 0x10004137
call fcn.10003f64
cmp dword [ebp + 8], 0
jne 0x10004144
xor eax, eax
jmp 0x100046dc
mov edx, dword [ebp + 8]
mov dword [ebp - 8], edx
push 0x40
mov ecx, dword [ebp - 8]
push ecx
call sub.KERNEL32.DLL_IsBadReadPtr
dec eax
je 0x10004162
mov eax, dword [ebp - 8]
cmp word [eax], 0x5a4d
je 0x10004169
xor eax, eax
jmp 0x100046dc
mov edx, dword [ebp - 8]
mov ebx, dword [edx + 0x3c]
add ebx, dword [ebp - 8]
push 0xf8
push ebx
call sub.KERNEL32.DLL_IsBadReadPtr
dec eax
je 0x10004188
cmp dword [ebx], 0x4550
je 0x1000418f
xor eax, eax
jmp 0x100046dc
cmp word [ebx + 0x14], 0xe0
jne 0x1000419f
cmp word [ebx + 0x18], 0x10b
je 0x100041a9
mov eax, 4
jmp 0x100046dc
cmp word [ebx + 6], 1
jae 0x100041b7
xor eax, eax
jmp 0x100046dc
mov edx, dword [ebp - 8]
mov ebx, dword [edx + 0x3c]
add ebx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov edx, dword [ebx + 0x80]
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0
je 0x100041e0
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
jmp 0x100041ea
mov eax, 8
jmp 0x100046dc
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x10004200
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x100046d7
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0xc]
add ebx, dword [ebp - 4]
xor eax, eax
mov dword [ebp - 0x10], eax
push ebx
call sub.KERNEL32.DLL_lstrlenA
mov esi, eax
mov edi, ebx
push esi
push str.Kernel32.dll
push edi
call fcn.10005e2c
add esp, 0xc
test eax, eax
jne 0x10004232
mov dword [ebp - 0x10], 1
push ebx
call sub.KERNEL32.DLL_lstrlenA
mov esi, eax
mov edi, ebx
push esi
push str.User32.dll
push edi
call fcn.10005e2c
add esp, 0xc
test eax, eax
jne 0x10004263
mov dword [ebp - 0x10], 2
jmp 0x10004263
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 0x10]
add edx, dword [ebp - 8]
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ecx + 0x10]
add ebx, dword [ebp - 8]
jmp 0x100046c1
mov edx, 0x80000000
test eax, edx
jne 0x100046b2
jmp 0x100044e4
cmp dword [ebp - 0x10], 1
jne 0x100046b2
mov edx, dword [ebx]
cmp edx, dword [0x100536dc]
jne 0x10004500
mov ecx, dword [0x10053220]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x100536e0]
jne 0x10004512
mov edx, dword [0x10053224]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x10053684]
jne 0x10004523
mov eax, dword [0x10053218]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x10053688]
jne 0x10004535
mov ecx, dword [0x1005321c]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x1005368c]
jne 0x10004547
mov edx, dword [0x1005322c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x100536b8]
jne 0x10004558
mov eax, dword [0x10053240]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x100536bc]
jne 0x1000456a
mov ecx, dword [0x1005323c]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x100536d4]
jne 0x1000457c
mov edx, dword [0x1005326c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x100536d8]
jne 0x1000458d
mov eax, dword [0x10053270]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x100536d0]
jne 0x1000459f
mov ecx, dword [0x10053254]
mov dword [ebx], ecx
cmp byte [ebp + 0xc], 1
jae 0x100046b2
mov eax, dword [ebx]
cmp eax, dword [0x10053690]
jne 0x100045bb
mov edx, dword [0x10053230]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x10053694]
jne 0x100045cc
mov eax, dword [0x10053238]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x10053698]
jne 0x100045de
mov ecx, dword [0x10053234]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x1005369c]
jne 0x100045f0
mov edx, dword [0x100531fc]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x100536a0]
jne 0x10004601
mov eax, dword [0x10053214]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x100536a4]
jne 0x10004613
mov ecx, dword [0x10053210]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x100536a8]
jne 0x10004625
mov edx, dword [0x10053200]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x100536ac]
jne 0x10004636
mov eax, dword [0x10053204]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x100536b0]
jne 0x10004648
mov ecx, dword [0x1005320c]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x100536b4]
jne 0x1000465a
mov edx, dword [0x10053208]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x100536c0]
jne 0x1000466b
mov eax, dword [0x10053244]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x100536c4]
jne 0x1000467d
mov ecx, dword [0x10053248]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x100536c8]
jne 0x1000468f
mov edx, dword [0x1005324c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x100536cc]
jne 0x100046a0
mov eax, dword [0x10053250]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x100536e4]
jne 0x100046b2
mov ecx, dword [0x10053258]
mov dword [ebx], ecx
test ebx, ebx
jne 0x100046ba
xor eax, eax
jmp 0x100046dc
add ebx, 4
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
test eax, eax
jne 0x1000427d
add dword [ebp - 0xc], 0x14
jmp 0x100041ea
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret