Function at 0x404050
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
cmp dword [0x4536d4], 0
push ebx
push esi
push edi
jne 0x404067
call fcn.00403e94
cmp dword [ebp + 8], 0
jne 0x404074
xor eax, eax
jmp 0x40460c
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 0x404092
mov eax, dword [ebp - 8]
cmp word [eax], 0x5a4d
je 0x404099
xor eax, eax
jmp 0x40460c
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 0x4040b8
cmp dword [ebx], 0x4550
je 0x4040bf
xor eax, eax
jmp 0x40460c
cmp word [ebx + 0x14], 0xe0
jne 0x4040cf
cmp word [ebx + 0x18], 0x10b
je 0x4040d9
mov eax, 4
jmp 0x40460c
cmp word [ebx + 6], 1
jae 0x4040e7
xor eax, eax
jmp 0x40460c
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 0x404110
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
jmp 0x40411a
mov eax, 8
jmp 0x40460c
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x404130
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x404607
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.00405d5c
add esp, 0xc
test eax, eax
jne 0x404162
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.00405d5c
add esp, 0xc
test eax, eax
jne 0x404193
mov dword [ebp - 0x10], 2
jmp 0x404193
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 0x4045f1
mov edx, 0x80000000
test eax, edx
jne 0x4045e2
jmp 0x404414
cmp dword [ebp - 0x10], 1
jne 0x4045e2
mov edx, dword [ebx]
cmp edx, dword [0x4536c8]
jne 0x404430
mov ecx, dword [0x45320c]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x4536cc]
jne 0x404442
mov edx, dword [0x453210]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x453670]
jne 0x404453
mov eax, dword [0x453204]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453674]
jne 0x404465
mov ecx, dword [0x453208]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453678]
jne 0x404477
mov edx, dword [0x453218]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x4536a4]
jne 0x404488
mov eax, dword [0x45322c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x4536a8]
jne 0x40449a
mov ecx, dword [0x453228]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x4536c0]
jne 0x4044ac
mov edx, dword [0x453258]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x4536c4]
jne 0x4044bd
mov eax, dword [0x45325c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x4536bc]
jne 0x4044cf
mov ecx, dword [0x453240]
mov dword [ebx], ecx
cmp byte [ebp + 0xc], 1
jae 0x4045e2
mov eax, dword [ebx]
cmp eax, dword [0x45367c]
jne 0x4044eb
mov edx, dword [0x45321c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x453680]
jne 0x4044fc
mov eax, dword [0x453224]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453684]
jne 0x40450e
mov ecx, dword [0x453220]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453688]
jne 0x404520
mov edx, dword [0x4531e8]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x45368c]
jne 0x404531
mov eax, dword [0x453200]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453690]
jne 0x404543
mov ecx, dword [0x4531fc]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453694]
jne 0x404555
mov edx, dword [0x4531ec]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x453698]
jne 0x404566
mov eax, dword [0x4531f0]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x45369c]
jne 0x404578
mov ecx, dword [0x4531f8]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x4536a0]
jne 0x40458a
mov edx, dword [0x4531f4]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x4536ac]
jne 0x40459b
mov eax, dword [0x453230]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x4536b0]
jne 0x4045ad
mov ecx, dword [0x453234]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x4536b4]
jne 0x4045bf
mov edx, dword [0x453238]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x4536b8]
jne 0x4045d0
mov eax, dword [0x45323c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x4536d0]
jne 0x4045e2
mov ecx, dword [0x453244]
mov dword [ebx], ecx
test ebx, ebx
jne 0x4045ea
xor eax, eax
jmp 0x40460c
add ebx, 4
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
test eax, eax
jne 0x4041ad
add dword [ebp - 0xc], 0x14
jmp 0x40411a
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret