Function at 0x583a40
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x20
push ecx
push edi
lea edi, [esp + 8]
mov eax, 0xcccccccc
mov ecx, 8
rep stosd dword es:[edi], eax
pop edi
pop ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x5a4d
je 0x583a76
mov eax, 0
lea esp, [ebp - 4]
pop ebx
pop ebp
ret
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
add edx, dword [eax + 0x3c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0x4550
je 0x583a98
mov eax, 0
lea esp, [ebp - 4]
pop ebx
pop ebp
ret
push 4
push 0x2000
mov eax, dword [ebp - 0x10]
push dword [eax + 0x50]
mov eax, dword [ebp - 0x10]
push dword [eax + 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x583ad2
push 4
push 0x2000
mov eax, dword [ebp - 0x10]
push dword [eax + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x583ae3
mov eax, 0
lea esp, [ebp - 4]
pop ebx
pop ebp
ret
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 8]
mov dword [eax + 0xc], 0
mov eax, dword [ebp - 8]
mov dword [eax + 8], 0
mov eax, dword [ebp - 8]
mov dword [eax + 0x10], 0
push 4
push 0x1000
mov eax, dword [ebp - 0x10]
push dword [eax + 0x50]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x1000
mov eax, dword [ebp - 0x10]
push dword [eax + 0x54]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebp - 0x10]
add edx, dword [eax + 0x54]
push edx
push dword [ebp - 0xc]
push dword [ebp - 0x18]
call fcn.0058ec40
add esp, 0xc
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
add edx, dword [eax + 0x3c]
mov eax, dword [ebp - 8]
mov dword [eax], edx
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x34], eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.00583490
add esp, 0xc
push dword [ebp - 8]
call fcn.005837c0
pop ecx
cmp eax, 0
je 0x583c0d
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub edx, dword [eax + 0x34]
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0
je 0x583bbf
push dword [ebp - 0x1c]
push dword [ebp - 8]
call fcn.005836e0
pop ecx
pop ecx
push dword [ebp - 8]
call fcn.00583590
pop ecx
mov eax, dword [ebp - 8]
mov edx, dword [eax]
cmp dword [edx + 0x28], 0
je 0x583c04
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
mov edx, dword [ebp - 0x14]
add edx, dword [ebx + 0x28]
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x20], 0
je 0x583c0d
push 0
push 1
push dword [ebp - 0x14]
call dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x583c0d
mov eax, dword [ebp - 8]
mov dword [eax + 0x10], 1
mov eax, dword [ebp - 8]
lea esp, [ebp - 4]
pop ebx
pop ebp
ret
push dword [ebp - 8]
call fcn.00583d50
pop ecx
mov eax, 0
lea esp, [ebp - 4]
pop ebx
pop ebp
ret