Function at 0x101283b0
Capabilities:
Allocate or change rwx memory
Get system information on windows
Inspect section memory permissions

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0x64
push 0xfffffffffffffffe
push 0x10393cc0
push 0x10127429
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x103b2018]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor edi, edi
mov dword [ebp + 0x60], edi
mov dword [ebp + 0x54], edi
mov dword [ebp - 0x3c], edi
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp], edi
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x30], 0xe0000000
mov dword [ebp + 0x34], 0x60000000
mov dword [ebp + 0x38], 0xc0000000
mov dword [ebp + 0x3c], 0x40000000
mov dword [ebp + 0x40], edi
mov dword [ebp + 0x1c], 0x40
mov dword [ebp + 0x20], 0x20
mov dword [ebp + 0x24], 4
mov dword [ebp + 0x28], 2
mov dword [ebp + 0x2c], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x38]
mov dword [ebp + 0x50], ecx
mov ecx, dword [ebp + 0x70]
mov eax, dword [ecx + 0x3c]
add eax, ecx
movzx edx, word [eax + 0x14]
lea ecx, [edx + eax + 0x18]
mov dword [ebp + 0x48], ecx
movzx edx, word [eax + 6]
mov dword [ebp + 0x70], edx
lea ecx, [ebp + 0x54]
push ecx
push 2
mov edx, dword [eax + 0x54]
push edx
mov eax, dword [ebp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x101284b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x60], eax
jmp 0x101285f7
xor ecx, ecx
mov dword [ebp + 0x4c], ecx
cmp cx, word [ebp + 0x70]
jae 0x101285f7
movzx eax, cx
lea edx, [eax + eax*4]
mov eax, dword [ebp + 0x48]
lea esi, [eax + edx*8]
mov ebx, dword [esi + 0x10]
cmp ebx, edi
je 0x101285df
mov edi, dword [esi + 0xc]
add edi, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x50]
push ecx
push edi
call fcn.10128200
mov dword [ebp + 0x44], eax
mov esi, dword [esi + 0x24]
or esi, 0x40000000
xor eax, eax
mov dword [ebp + 0x58], eax
mov ecx, dword [ebp + eax*4 + 0x30]
test ecx, ecx
je 0x1012850f
mov edx, esi
and edx, ecx
cmp ecx, edx
je 0x1012850f
add eax, 1
jmp 0x101284f7
mov eax, dword [ebp + eax*4 + 0x1c]
mov dword [ebp + 0x5c], eax
test esi, 0x4000000
je 0x10128526
or eax, 0x200
mov dword [ebp + 0x5c], eax
lea ecx, [ebp + 0x54]
push ecx
push eax
mov eax, ebx
xor edx, edx
mov ecx, dword [ebp + 0x50]
div ecx
imul eax, ecx
push eax
mov ebx, dword [ebp + 0x44]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x101284a5
cmp edi, ebx
je 0x101285da
push 0x1c
lea edx, [ebp]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x101284a5
mov edx, dword [ebp + 0x14]
mov dword [ebp + 0x5c], edx
xor ecx, ecx
mov dword [ebp + 0x58], ecx
mov eax, dword [ebp + ecx*4 + 0x1c]
mov dword [ebp + 0x5c], eax
test eax, eax
je 0x1012858a
mov edi, edx
and edi, eax
cmp eax, edi
je 0x1012858a
add ecx, 1
jmp 0x1012856f
or esi, dword [ebp + ecx*4 + 0x30]
xor ecx, ecx
mov dword [ebp + 0x58], ecx
mov eax, dword [ebp + ecx*4 + 0x30]
test eax, eax
je 0x101285a8
mov edx, esi
and edx, eax
cmp eax, edx
je 0x101285a8
add ecx, 1
jmp 0x10128590
mov ecx, dword [ebp + ecx*4 + 0x1c]
mov dword [ebp + 0x5c], ecx
test esi, 0x4000000
je 0x101285c0
or ecx, 0x200
mov dword [ebp + 0x5c], ecx
lea eax, [ebp + 0x54]
push eax
push ecx
mov eax, dword [ebp + 0x50]
push eax
sub ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x101284a5
xor edi, edi
mov ecx, dword [ebp + 0x4c]
add ecx, 1
jmp 0x101284b5
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp + 0x60]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x64
mov esp, ebp
pop ebp
ret 8