Function at 0x403990
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
cmp dword [0x451eb8], 0
push ebx
push esi
push edi
jne 0x4039a7
call fcn.004037d4
cmp dword [ebp + 8], 0
jne 0x4039b4
xor eax, eax
jmp 0x403f4c
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 0x4039d2
mov eax, dword [ebp - 8]
cmp word [eax], 0x5a4d
je 0x4039d9
xor eax, eax
jmp 0x403f4c
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 0x4039f8
cmp dword [ebx], 0x4550
je 0x4039ff
xor eax, eax
jmp 0x403f4c
cmp word [ebx + 0x14], 0xe0
jne 0x403a0f
cmp word [ebx + 0x18], 0x10b
je 0x403a19
mov eax, 4
jmp 0x403f4c
cmp word [ebx + 6], 1
jae 0x403a27
xor eax, eax
jmp 0x403f4c
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 0x403a50
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
jmp 0x403a5a
mov eax, 8
jmp 0x403f4c
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x403a70
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x403f47
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.00405690
add esp, 0xc
test eax, eax
jne 0x403aa2
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.00405690
add esp, 0xc
test eax, eax
jne 0x403ad3
mov dword [ebp - 0x10], 2
jmp 0x403ad3
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 0x403f31
mov edx, 0x80000000
test eax, edx
jne 0x403f22
jmp 0x403d54
cmp dword [ebp - 0x10], 1
jne 0x403f22
mov edx, dword [ebx]
cmp edx, dword [0x451eac]
jne 0x403d70
mov ecx, dword [0x4519f0]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x451eb0]
jne 0x403d82
mov edx, dword [0x4519f4]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451e54]
jne 0x403d93
mov eax, dword [0x4519e8]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451e58]
jne 0x403da5
mov ecx, dword [0x4519ec]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x451e5c]
jne 0x403db7
mov edx, dword [0x4519fc]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451e88]
jne 0x403dc8
mov eax, dword [0x451a10]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451e8c]
jne 0x403dda
mov ecx, dword [0x451a0c]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x451ea4]
jne 0x403dec
mov edx, dword [0x451a3c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451ea8]
jne 0x403dfd
mov eax, dword [0x451a40]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451ea0]
jne 0x403e0f
mov ecx, dword [0x451a24]
mov dword [ebx], ecx
cmp byte [ebp + 0xc], 1
jae 0x403f22
mov eax, dword [ebx]
cmp eax, dword [0x451e60]
jne 0x403e2b
mov edx, dword [0x451a00]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451e64]
jne 0x403e3c
mov eax, dword [0x451a08]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451e68]
jne 0x403e4e
mov ecx, dword [0x451a04]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x451e6c]
jne 0x403e60
mov edx, dword [0x4519cc]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451e70]
jne 0x403e71
mov eax, dword [0x4519e4]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451e74]
jne 0x403e83
mov ecx, dword [0x4519e0]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x451e78]
jne 0x403e95
mov edx, dword [0x4519d0]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451e7c]
jne 0x403ea6
mov eax, dword [0x4519d4]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451e80]
jne 0x403eb8
mov ecx, dword [0x4519dc]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x451e84]
jne 0x403eca
mov edx, dword [0x4519d8]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451e90]
jne 0x403edb
mov eax, dword [0x451a14]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451e94]
jne 0x403eed
mov ecx, dword [0x451a18]
mov dword [ebx], ecx
mov eax, dword [ebx]
cmp eax, dword [0x451e98]
jne 0x403eff
mov edx, dword [0x451a1c]
mov dword [ebx], edx
mov ecx, dword [ebx]
cmp ecx, dword [0x451e9c]
jne 0x403f10
mov eax, dword [0x451a20]
mov dword [ebx], eax
mov edx, dword [ebx]
cmp edx, dword [0x451eb4]
jne 0x403f22
mov ecx, dword [0x451a28]
mov dword [ebx], ecx
test ebx, ebx
jne 0x403f2a
xor eax, eax
jmp 0x403f4c
add ebx, 4
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x14]
mov eax, dword [edx]
test eax, eax
jne 0x403aed
add dword [ebp - 0xc], 0x14
jmp 0x403a5a
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret