Function at 0x404168
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
cmp dword [0x46f5e8], 0
push ebx
push esi
push edi
jne 0x40417f
call fcn.00403fac
cmp dword [ebp + 8], 0
jne 0x40418c
xor eax, eax
jmp 0x404724
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 0x4041aa
mov eax, dword [ebp - 8]
cmp word [eax], 0x5a4d
je 0x4041b1
xor eax, eax
jmp 0x404724
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 0x4041d0
cmp dword [ebx], 0x4550
je 0x4041d7
xor eax, eax
jmp 0x404724
cmp word [ebx + 0x14], 0xe0
jne 0x4041e7
cmp word [ebx + 0x18], 0x10b
je 0x4041f1
mov eax, 4
jmp 0x404724
cmp word [ebx + 6], 1
jae 0x4041ff
xor eax, eax
jmp 0x404724
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 0x404228
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
jmp 0x404232
mov eax, 8
jmp 0x404724
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x404248
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x40471f
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.00405e88
add esp, 0xc
test eax, eax
jne 0x40427a
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.00405e88
add esp, 0xc
test eax, eax
jne 0x4042ab
mov dword [ebp - 0x10], 2
jmp 0x4042ab
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 0x404709
mov edx, 0x80000000
test eax, edx
jne 0x4046fa
jmp 0x40452c
cmp dword [ebp - 0x10], 1
jne 0x4046fa
mov edx, dword [ebx]
cmp edx, dword [0x46f5dc]
jne 0x404548
mov ecx, dword [0x46f10c]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x46f5e0]
jne 0x40455a
mov edx, dword [0x46f110]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f584]
jne 0x40456b
mov eax, dword [0x46f104]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f588]
jne 0x40457d
mov ecx, dword [0x46f108]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x46f58c]
jne 0x40458f
mov edx, dword [0x46f118]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f5b8]
jne 0x4045a0
mov eax, dword [0x46f12c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f5bc]
jne 0x4045b2
mov ecx, dword [0x46f128]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x46f5d4]
jne 0x4045c4
mov edx, dword [0x46f15c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f5d8]
jne 0x4045d5
mov eax, dword [0x46f160]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f5d0]
jne 0x4045e7
mov ecx, dword [0x46f140]
mov dword [ebx], ecx
cmp byte [ebp + 0xc], 1
jae 0x4046fa
mov eax, dword [ebx]
cmp eax, dword [0x46f590]
jne 0x404603
mov edx, dword [0x46f11c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f594]
jne 0x404614
mov eax, dword [0x46f124]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f598]
jne 0x404626
mov ecx, dword [0x46f120]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x46f59c]
jne 0x404638
mov edx, dword [0x46f0e8]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f5a0]
jne 0x404649
mov eax, dword [0x46f100]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f5a4]
jne 0x40465b
mov ecx, dword [0x46f0fc]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x46f5a8]
jne 0x40466d
mov edx, dword [0x46f0ec]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f5ac]
jne 0x40467e
mov eax, dword [0x46f0f0]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f5b0]
jne 0x404690
mov ecx, dword [0x46f0f8]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x46f5b4]
jne 0x4046a2
mov edx, dword [0x46f0f4]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f5c0]
jne 0x4046b3
mov eax, dword [0x46f130]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f5c4]
jne 0x4046c5
mov ecx, dword [0x46f134]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x46f5c8]
jne 0x4046d7
mov edx, dword [0x46f138]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x46f5cc]
jne 0x4046e8
mov eax, dword [0x46f13c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x46f5e4]
jne 0x4046fa
mov ecx, dword [0x46f144]
mov dword [ebx], ecx
test ebx, ebx
jne 0x404702
xor eax, eax
jmp 0x404724
add ebx, 4
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
test eax, eax
jne 0x4042c5
add dword [ebp - 0xc], 0x14
jmp 0x404232
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret