Function at 0x4bae40
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov edx, dword [0x4bafbc]
mov eax, 0x1c
call fcn.004057c4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov edx, 0x1c
call fcn.00402f88
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x18], 0x19770605
mov edi, dword [ebp + 8]
mov esi, edi
cmp word [esi], 0x5a4d
je 0x4baeac
mov edx, dword [0x4bafbc]
mov eax, dword [ebp - 0xc]
call fcn.004057d8
mov eax, 0x4bb848
call fcn.004ba87c
jmp 0x4bb0ce
mov eax, dword [esi + 0x3c]
lea ebx, [edi + eax]
cmp dword [ebx], 0x4550
je 0x4baed7
mov edx, dword [0x4bafbc]
mov eax, dword [ebp - 0xc]
call fcn.004057d8
mov eax, 0x4bb884
call fcn.004ba87c
jmp 0x4bb0ce
cmp word [ebx + 4], 0x14c
je 0x4baefc
mov edx, dword [0x4bafbc]
mov eax, dword [ebp - 0xc]
call fcn.004057d8
mov eax, 0x4bb8bc
call fcn.004ba87c
jmp 0x4bb0ce
push 0x40
push 0x3000
mov eax, dword [ebx + 0x50]
push eax
mov eax, dword [ebx + 0x34]
push eax
call fcn.004072ac
mov edx, dword [ebp - 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 4], 0
jne 0x4baf37
push 0x40
push 0x2000
mov eax, dword [ebx + 0x50]
push eax
push 0
call fcn.004072ac
mov edx, dword [ebp - 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax + 4], 0
jne 0x4baf5d
mov edx, dword [0x4bafbc]
mov eax, dword [ebp - 0xc]
call fcn.004057d8
mov eax, 0x4bb8dc
call fcn.004ba87c
jmp 0x4bb0ce
push 0x40
push 0x1000
mov eax, dword [ebx + 0x50]
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
push eax
call fcn.004072ac
push 0x40
push 0x1000
mov eax, dword [ebx + 0x54]
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
push eax
call fcn.004072ac
mov eax, dword [esi + 0x3c]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 4]
lea eax, [edx + eax]
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
mov ecx, dword [ebx + 0x54]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov edx, esi
call fcn.00407b6c
mov eax, dword [esi + 0x3c]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 4]
lea eax, [edx + eax]
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 4]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 0xc]
mov ecx, eax
mov edx, ebx
mov eax, edi
call fcn.004ba884
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
xor edx, edx
push edx
push eax
mov eax, dword [ebx + 0x34]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 0
jne 0x4baffc
cmp dword [ebp - 0x18], 0
je 0x4bb00c
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
call fcn.004bab10
mov eax, dword [ebp - 0xc]
call fcn.004ba954
test al, al
jne 0x4bb029
lea eax, [ebp - 0xc]
xor edx, edx
push edx
push eax
call fcn.004bb2e0
jmp 0x4bb0ce
mov eax, dword [ebp - 0xc]
call fcn.004bac70
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
call fcn.004badc4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x4bb0c3
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 4]
lea ebx, [edx + eax]
mov eax, dword [ebp - 0xc]
mov dword [eax + 8], ebx
mov eax, dword [ebp - 0xc]
cmp dword [eax + 8], 0
je 0x4bb0ae
xor eax, eax
push ebp
push 0x4bb802
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
push eax
call ebx
test eax, eax
jne 0x4bb098
lea eax, [ebp - 0xc]
xor edx, edx
push edx
push eax
call fcn.004bb2e0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4bb0ce
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4bb0bc
lea eax, [ebp - 0xc]
xor edx, edx
push edx
push eax
call fcn.004bb2e0
jmp 0x4bb0ce
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x14], 1
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4