Function at 0x100249e0
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x24], 0
xor eax, eax
mov word [ebp - 0x1c], ax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
xor ecx, ecx
mov word [ebp - 0x10], cx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
je 0x10024a5b
push str.PreparePEImage__:_pDosHeader__e_magic_bad_signature
push 0
call main
add esp, 8
xor eax, eax
jmp 0x10024da3
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
cmp dword [ecx], 0x4550
je 0x10024a88
push str.PreparePEImage__:_pPeHeader32__Signature_bad_signature
push 0
call main
add esp, 8
xor eax, eax
jmp 0x10024da3
mov edx, dword [ebp - 0x28]
movzx eax, word [edx + 4]
cmp eax, 0x14c
jne 0x10024ac8
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x34]
push edx
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 0x18]
push ecx
push str.PreparePEImage__:_PeHeader.FileHeader.MachineIMAGE_FILE_MACHINE_I386_pPeHeader32__OptionalHeader.Magic_04x_ImageBase_p
call fcn.10018570
add esp, 0xc
mov edx, dword [ebp - 0x28]
mov ax, word [edx + 6]
mov word [ebp - 0x10], ax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x50]
mov dword [ebp - 0x2c], edx
jmp 0x10024b38
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 4]
cmp ecx, 0x8664
jne 0x10024b1a
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x34]
push ecx
mov edx, dword [eax + 0x30]
push edx
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax + 0x18]
push ecx
push str.PreparePEImage__:_PeHeader.FileHeader.MachineIMAGE_FILE_MACHINE_AMD64_pPeHeader64__OptionalHeader.Magic_04x_ImageBase_016llx
call fcn.10018570
add esp, 0x10
mov edx, dword [ebp - 0x20]
mov ax, word [edx + 6]
mov word [ebp - 0x10], ax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x50]
mov dword [ebp - 0x2c], edx
jmp 0x10024b38
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 4]
push ecx
push str.PreparePEImage__:_unsupported_pPeHeader__FileHeader.Machine:__04x
push 0
call main
add esp, 0xc
xor eax, eax
jmp 0x10024da3
mov edx, dword [ebp - 0x2c]
push edx
push str.PreparePEImage__:_OptionalHeader.SizeOfImage_u
call fcn.10018570
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x10024c13
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 4]
cmp ecx, 0x14c
jne 0x10024bb8
push 0x40
push 0x1000
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x10024b9d
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x34]
push ecx
push str.PreparePEImage__:_VirtualAlloc_on__p_success_pLocalImage_p
call fcn.10018570
add esp, 0xc
jmp 0x10024bb8
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x34]
push eax
push str.PreparePEImage__:_VirtualAlloc_on__p_failed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call main
add esp, 0xc
cmp dword [ebp - 0xc], 0
jne 0x10024bd4
push 0x40
push 0x1000
mov ecx, dword [ebp - 0x2c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x10024bf9
mov edx, dword [ebp - 0x2c]
push edx
push str.PreparePEImage__:_VirtualAlloc____u_bytes_failed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call main
add esp, 0xc
xor eax, eax
jmp 0x10024da3
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x34]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push str.PreparePEImage__:_VirtualAlloc___success__pLocalImage_p_pPeHeader32__OptionalHeader.ImageBase_p
call fcn.10018570
add esp, 0xc
jmp 0x10024c54
mov eax, dword [ebp - 0x2c]
push eax
call fcn.10019ae0
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x10024c47
mov ecx, dword [ebp - 0x2c]
push ecx
push str.PreparePEImage__:_mem_alloc____u_bytes_failed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call main
add esp, 0xc
xor eax, eax
jmp 0x10024da3
push str.PreparePEImage__:_MemAlloc___success_
call fcn.10018570
add esp, 4
cmp dword [ebp - 0x20], 0
je 0x10024c8f
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x3c]
mov ecx, dword [ebp + 8]
lea edx, [ecx + eax + 0x108]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.10019c40
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x54]
mov dword [ebp - 4], edx
jmp 0x10024cc2
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0xf8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x54]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.10019c40
add esp, 0xc
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x54]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0
jmp 0x10024cd4
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
movzx edx, word [ebp - 0x10]
cmp dword [ebp - 8], edx
jae 0x10024d88
push 9
push 0
lea eax, [ebp - 0x38]
push eax
call fcn.10019d20
add esp, 0xc
push 8
mov ecx, dword [ebp - 8]
imul ecx, ecx, 0x28
add ecx, dword [ebp - 0x14]
push ecx
lea edx, [ebp - 0x38]
push edx
call fcn.10019c40
add esp, 0xc
mov eax, dword [ebp - 8]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + eax + 0x10]
push edx
mov eax, dword [ebp - 8]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
push edx
mov eax, dword [ebp - 8]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + eax + 0xc]
push edx
call fcn.10019c40
add esp, 0xc
mov eax, dword [ebp - 8]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
mov eax, dword [ebp - 8]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x14]
add edx, dword [ecx + eax + 0x10]
cmp edx, dword [ebp - 0x18]
jbe 0x10024d83
mov edx, dword [ebp - 8]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + edx + 0x14]
mov edx, dword [ebp - 8]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x14]
add ecx, dword [eax + edx + 0x10]
mov dword [ebp - 0x18], ecx
jmp 0x10024ccb
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp + 8]
push edx
push str.PreparePEImage__:__pEndOfImage____LONG_PTR_file_buf__u_dwFileBufLen_u
call fcn.10018570
add esp, 0xc
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret