Function at 0x1000af50
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x28
cmp word [eax], 0x5a4d
je 0x1000af6f
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
add esp, 0x28
ret
push ebx
mov ebx, dword [eax + 0x3c]
add ebx, eax
cmp dword [ebx], 0x4550
je 0x1000af8f
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
add esp, 0x28
ret
cmp word [ebx + 4], 0x14c
jne 0x1000af7d
test byte [ebx + 0x38], 1
jne 0x1000af7d
mov eax, dword [ebx + 0x50]
mov ecx, dword [ebx + 0x34]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push edi
push 4
push 0x3000
push eax
push ecx
call esi
mov edi, eax
test edi, edi
mov dword [esp + 0xc], edi
jne 0x1000afeb
mov edx, dword [ebx + 0x50]
push 4
push 0x3000
push edx
push eax
call esi
test eax, eax
mov dword [esp + 0xc], eax
jne 0x1000afe7
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x28
ret
mov edi, dword [esp + 0xc]
push ebp
push 0x34
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
xor eax, eax
cmp ebp, eax
jne 0x1000b025
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x28
ret
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0x10], eax
mov dword [ebp + 4], edi
mov ax, word [ebx + 0x16]
mov dword [ebp + 0x20], edx
mov dword [ebp + 0x1c], ecx
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x14]
push edx
mov dword [ebp + 0x28], ecx
shr eax, 0xd
and eax, 1
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x4c]
mov dword [ebp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [esp + 0x18]
push 4
mov dword [ebp + 0x30], eax
mov ecx, dword [ebx + 0x54]
push 0x1000
push ecx
push edi
call esi
mov ecx, dword [ebx + 0x54]
mov esi, dword [esp + 0x3c]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + 0x3c]
mov edi, dword [esp + 0x10]
push ebp
add eax, edx
push ebx
mov dword [ebp], eax
push ecx
mov dword [eax + 0x34], edi
call fcn.1000a880
add esp, 0xc
test eax, eax
je 0x1000b11c
mov eax, edi
sub eax, dword [ebx + 0x34]
je 0x1000b0ca
push eax
mov eax, ebp
call fcn.1000ab90
add esp, 4
mov dword [ebp + 0x18], eax
jmp 0x1000b0d1
mov dword [ebp + 0x18], 1
mov esi, ebp
call fcn.1000ac20
test eax, eax
je 0x1000b11c
push ebp
call fcn.1000aa00
add esp, 4
test eax, eax
je 0x1000b11c
mov eax, ebp
call fcn.1000ab50
test eax, eax
je 0x1000b11c
mov eax, dword [ebp]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x1000b14d
add eax, edi
cmp dword [ebp + 0x14], 0
je 0x1000b140
push 0
push 1
push edi
call eax
test eax, eax
jne 0x1000b12f
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebp
call fcn.1000aec0
add esp, 4
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x28
ret
mov dword [ebp + 0x10], 1
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov dword [ebp + 0x2c], eax
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret
mov dword [ebp + 0x2c], 0
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret