Function at 0x1008f580
Capabilities:
Allocate or change rwx memory
Get system information on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x10e8
call fcn.100a18d0
mov eax, dword [0x100bc040]
xor eax, esp
mov dword [esp + 0x10e4], eax
mov eax, dword fs:[0x2c]
push esi
mov esi, dword [0x1019fc78]
mov dword [esp + 0x1c], ecx
push edi
mov edi, edx
mov ecx, dword [eax + esi*4]
mov eax, dword [0x10201fb8]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], ecx
cmp eax, dword [ecx + 4]
jle 0x1008f610
push 0x10201fb8
call fcn.100a085e
add esp, 4
cmp dword [0x10201fb8], 0xffffffff
jne 0x1008f610
cmp dword [0x1019c8d4], 0xffffffff
jne 0x1008f603
lea eax, [esp + 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0xc8]
mov dword [0x1019c8d4], eax
push 0x10201fb8
call fcn.100a080d
add esp, 4
mov ecx, dword [ebp + 8]
mov edx, 1
mov dword [esp + 0x1c], edx
test ecx, ecx
je 0x1008fa75
nop dword [eax]
nop dword [eax + eax]
mov edx, dword [esp + 0x24]
mov esi, 0x1000
mov eax, dword [0x10201fb0]
cmp ecx, esi
cmovb esi, ecx
mov ecx, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0xc], ecx
cmp eax, dword [edx + 4]
jle 0x1008f6a5
push 0x10201fb0
call fcn.100a085e
add esp, 4
cmp dword [0x10201fb0], 0xffffffff
jne 0x1008f6a1
mov eax, dword [0x1019c8d4]
cmp eax, 0xffffffff
jne 0x1008f68f
lea eax, [esp + 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0xc8]
mov dword [0x1019c8d4], eax
push 0x10201fb0
mov dword [0x10201fac], eax
call fcn.100a080d
add esp, 4
mov ecx, dword [esp + 0xc]
mov dword [esp + 0xb4], 0
lea eax, [esp + 0xe8]
mov dword [esp + 0x10], eax
mov eax, 1
mov dword [esp + 0x14], 0
test esi, esi
je 0x1008f839
mov esi, dword [0x10201fac]
xor edx, edx
mov eax, edi
mov dword [esp + 0x18], 1
div esi
push 0xee
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
mov ecx, edi
mov edx, esi
call fcn.1008f4f0
add esp, 4
test al, al
je 0x1008f737
lea eax, [esp + 0xb4]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1008f72f
push esi
push eax
push dword [esp + 0x18]
mov dword [esp + 0x24], eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
jmp 0x1008f746
mov dword [esp + 0x14], 1
push esi
push edi
push dword [esp + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
je 0x1008f81b
lea eax, [esp + 0xbc]
push eax
push dword [esp + 0xb8]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1008f81b
mov dword [esp + 0x30], 0x49f2ea87
mov dword [esp + 0x34], 0xf32024ed
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x38], 0x4aab88d6
mov dword [esp + 0x3c], 0xc0ba354c
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x40], 0x2b8088e5
mov dword [esp + 0x44], 0xf32024ed
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x90], eax
mov dword [esp + 0x48], 0x4aab88d6
mov dword [esp + 0x94], ecx
mov dword [esp + 0x4c], 0xc0ba354c
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
movaps xmm1, xmmword [esp + 0x70]
mov dword [esp + 0x98], eax
lea eax, [esp + 0x70]
mov dword [esp + 0x9c], ecx
xorps xmm1, xmmword [esp + 0x90]
push eax
movaps xmmword [esp + 0x74], xmm1
call fcn.100245e0
add esp, 4
mov ecx, dword [esp + 0xc]
add edi, esi
add dword [esp + 0x10], esi
sub ecx, esi
mov dword [esp + 0xc], ecx
jne 0x1008f6d0
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
xor ecx, ecx
test eax, eax
mov eax, dword [0x10201fb4]
cmovne ecx, dword [esp + 0x1c]
mov dword [esp + 0x1c], ecx
mov ecx, esi
mov dword [esp + 0xc], ecx
cmp eax, dword [edx + 4]
jle 0x1008f8ad
push 0x10201fb4
call fcn.100a085e
add esp, 4
cmp dword [0x10201fb4], 0xffffffff
jne 0x1008f8a9
mov eax, dword [0x1019c8d4]
cmp eax, 0xffffffff
jne 0x1008f897
lea eax, [esp + 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0xc8]
mov dword [0x1019c8d4], eax
push 0x10201fb4
mov dword [0x10201fa8], eax
call fcn.100a080d
add esp, 4
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x20]
lea eax, [esp + 0xe8]
mov dword [esp + 0x10], eax
mov eax, 1
mov dword [esp + 0xb8], 0
mov dword [esp + 0x18], 0
test esi, esi
je 0x1008fa4a
nop dword [eax]
mov esi, dword [0x10201fa8]
xor edx, edx
mov eax, edi
mov dword [esp + 0x14], 1
div esi
push 0xcc
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
mov ecx, edi
mov edx, esi
call fcn.1008f4f0
add esp, 4
test al, al
je 0x1008f934
lea eax, [esp + 0xb8]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1008f92c
mov dword [esp + 0x14], eax
jmp 0x1008f942
mov dword [esp + 0x18], 1
push esi
push dword [esp + 0x14]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [esp + 0x18], 0
je 0x1008fa2c
lea eax, [esp + 0xc0]
push eax
push dword [esp + 0xbc]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1008fa2c
mov dword [esp + 0x50], 0x2bb3bbd6
mov dword [esp + 0x54], 0xf32024ed
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
mov dword [esp + 0x58], 0x4aab88d6
mov dword [esp + 0x5c], 0xc0ba354c
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x60], 0x2b8088e5
mov dword [esp + 0x64], 0xf32024ed
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0xa0], eax
mov dword [esp + 0x68], 0x4aab88d6
mov dword [esp + 0xa4], ecx
mov dword [esp + 0x6c], 0xc0ba354c
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
movaps xmm1, xmmword [esp + 0x80]
mov dword [esp + 0xa8], eax
lea eax, [esp + 0x80]
mov dword [esp + 0xac], ecx
xorps xmm1, xmmword [esp + 0xa0]
push eax
movaps xmmword [esp + 0x84], xmm1
call fcn.100245e0
add esp, 4
mov ecx, dword [esp + 0xc]
add edi, esi
add dword [esp + 0x10], esi
sub ecx, esi
mov dword [esp + 0xc], ecx
jne 0x1008f8e0
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
mov ecx, dword [ebp + 8]
xor edx, edx
mov edi, dword [esp + 0x2c]
test eax, eax
cmovne edx, dword [esp + 0x1c]
sub ecx, esi
add dword [esp + 0x20], esi
add edi, esi
mov dword [esp + 0x1c], edx
mov dword [ebp + 8], ecx
mov dword [esp + 0x2c], edi
test ecx, ecx
jne 0x1008f630
mov ecx, dword [esp + 0x10ec]
mov eax, edx
pop edi
pop esi
xor ecx, esp
call fcn.100a046e
mov esp, ebp
pop ebp
ret