Function at 0x4041fc
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
cmp dword [0x453748], 0
push ebx
push esi
push edi
jne 0x404213
call fcn.00404040
cmp dword [ebp + 8], 0
jne 0x404220
xor eax, eax
jmp 0x4047b8
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 0x40423e
mov eax, dword [ebp - 8]
cmp word [eax], 0x5a4d
je 0x404245
xor eax, eax
jmp 0x4047b8
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 0x404264
cmp dword [ebx], 0x4550
je 0x40426b
xor eax, eax
jmp 0x4047b8
cmp word [ebx + 0x14], 0xe0
jne 0x40427b
cmp word [ebx + 0x18], 0x10b
je 0x404285
mov eax, 4
jmp 0x4047b8
cmp word [ebx + 6], 1
jae 0x404293
xor eax, eax
jmp 0x4047b8
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 0x4042bc
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
jmp 0x4042c6
mov eax, 8
jmp 0x4047b8
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x4042dc
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x4047b3
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.00405f08
add esp, 0xc
test eax, eax
jne 0x40430e
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.00405f08
add esp, 0xc
test eax, eax
jne 0x40433f
mov dword [ebp - 0x10], 2
jmp 0x40433f
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 0x40479d
mov edx, 0x80000000
test eax, edx
jne 0x40478e
jmp 0x4045c0
cmp dword [ebp - 0x10], 1
jne 0x40478e
mov edx, dword [ebx]
cmp edx, dword [0x45373c]
jne 0x4045dc
mov ecx, dword [0x453278]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453740]
jne 0x4045ee
mov edx, dword [0x45327c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x4536e4]
jne 0x4045ff
mov eax, dword [0x453270]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x4536e8]
jne 0x404611
mov ecx, dword [0x453274]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x4536ec]
jne 0x404623
mov edx, dword [0x453284]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x453718]
jne 0x404634
mov eax, dword [0x453298]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x45371c]
jne 0x404646
mov ecx, dword [0x453294]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453734]
jne 0x404658
mov edx, dword [0x4532c4]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x453738]
jne 0x404669
mov eax, dword [0x4532c8]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453730]
jne 0x40467b
mov ecx, dword [0x4532ac]
mov dword [ebx], ecx
cmp byte [ebp + 0xc], 1
jae 0x40478e
mov eax, dword [ebx]
cmp eax, dword [0x4536f0]
jne 0x404697
mov edx, dword [0x453288]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x4536f4]
jne 0x4046a8
mov eax, dword [0x453290]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x4536f8]
jne 0x4046ba
mov ecx, dword [0x45328c]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x4536fc]
jne 0x4046cc
mov edx, dword [0x453254]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x453700]
jne 0x4046dd
mov eax, dword [0x45326c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453704]
jne 0x4046ef
mov ecx, dword [0x453268]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453708]
jne 0x404701
mov edx, dword [0x453258]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x45370c]
jne 0x404712
mov eax, dword [0x45325c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453710]
jne 0x404724
mov ecx, dword [0x453264]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453714]
jne 0x404736
mov edx, dword [0x453260]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x453720]
jne 0x404747
mov eax, dword [0x45329c]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453724]
jne 0x404759
mov ecx, dword [0x4532a0]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x453728]
jne 0x40476b
mov edx, dword [0x4532a4]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x45372c]
jne 0x40477c
mov eax, dword [0x4532a8]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x453744]
jne 0x40478e
mov ecx, dword [0x4532b0]
mov dword [ebx], ecx
test ebx, ebx
jne 0x404796
xor eax, eax
jmp 0x4047b8
add ebx, 4
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
test eax, eax
jne 0x404359
add dword [ebp - 0xc], 0x14
jmp 0x4042c6
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret