Function at 0x10013460
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x448
mov eax, dword [0x1008179c]
xor eax, esp
mov dword [esp + 0x444], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push esi
push edi
mov esi, dword [ecx]
xor edi, edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], eax
cmp dword [0x1008262c], edi
jne 0x100134be
push 0x10082630
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x100
push edi
push 0x10082648
call fcn.10015bf0
add esp, 0xc
mov dword [0x1008262c], 1
push 0x10082630
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call fcn.10013a40
push dword [esp + 0x20]
mov esi, eax
mov dword [esp + 0x18], esi
call fcn.10013a40
mov dword [esp + 0x20], eax
lea eax, [esp + 0x88]
push 1
push eax
call fcn.10001940
add esp, 0x10
test eax, eax
je 0x1001382d
xor edi, edi
nop
push 0x26
push esi
push 0
lea eax, [esp + 0x8c]
push esi
push eax
call fcn.10001820
mov ecx, eax
add esp, 0x14
test ecx, ecx
je 0x10013554
mov eax, dword [ecx + 0x11c]
cmp eax, 0x105
je 0x10013554
cmp eax, 0x101
je 0x10013554
cmp eax, 0x102
je 0x10013554
cmp eax, 0x103
je 0x10013554
cmp eax, 0x104
je 0x10013554
mov eax, dword [ecx + 0x128]
add edi, eax
add esi, eax
cmp edi, 5
jb 0x10013500
lea eax, [esp + 0x80]
mov dword [esp + 0x20], edi
push eax
call fcn.10001800
mov esi, edi
add esp, 4
mov edi, 0
cmp esi, 5
jb 0x1001382d
push esi
push dword [esp + 0x14]
call fcn.10013a80
add esp, 8
mov dword [esp + 0x1c], edi
cmp dword [0x10082748], 0x40
jae 0x10013682
mov eax, dword [esp + 0x10]
cmp eax, 0x80000000
jae 0x100135b4
add eax, 0x7ff80000
mov dword [esp + 0xc], 1
mov dword [esp + 0x14], eax
jmp 0x100135c5
add eax, 0x80010000
mov dword [esp + 0x14], 0xfff80000
mov dword [esp + 0xc], eax
xorps xmm0, xmm0
mov dword [esp + 0x70], edi
lea eax, [esp + 0x50]
movaps xmmword [esp + 0x50], xmm0
push eax
movaps xmmword [esp + 0x64], xmm0
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x14]
jae 0x10013682
nop
push 0x1c
lea ecx, [esp + 0x38]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10013659
cmp dword [esp + 0x44], 0x10000
jne 0x10013647
mov eax, dword [esp + 0x40]
cmp eax, 0x6c
jb 0x1001364b
mov ecx, dword [esp + 0x6c]
cmp eax, ecx
jb 0x1001364b
mov eax, dword [esp + 0xc]
xor edx, edx
dec eax
add eax, ecx
div ecx
push 0x20
imul eax, ecx
push 0x3000
push 0x6c
push eax
call fcn.100118e0
mov edi, eax
add esp, 0x10
mov dword [esp + 0x1c], edi
test edi, edi
jne 0x10013661
mov eax, dword [esp + 0x40]
add eax, dword [esp + 0x34]
mov dword [esp + 0xc], eax
cmp eax, dword [esp + 0x14]
jb 0x100135f0
test edi, edi
je 0x10013828
xor eax, eax
cmp dword [eax*4 + 0x10082648], 0
je 0x10013675
inc eax
cmp eax, 0x40
jb 0x10013663
jmp 0x10013682
inc dword [0x10082748]
mov dword [eax*4 + 0x10082648], edi
test edi, edi
je 0x10013828
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x24]
mov dword [esp + 0xc], eax
push ecx
push 0x40
push esi
push dword [esp + 0x1c]
mov dword [esp + 0x34], 0
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x100137e4
lea eax, [esp + 0x14]
push eax
push 0x40
push 0x6c
push edi
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x100137bb
mov ecx, dword [esp + 0x10]
lea eax, [edi + 0x2c]
mov dword [esp + 0x28], eax
xor edx, edx
lea eax, [edi + 0x4c]
mov edi, dword [esp + 0x28]
sub ecx, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
nop dword [eax]
lea eax, [edx + edi]
mov cl, byte [ecx + eax]
mov byte [eax], cl
mov eax, dword [esp + 0x2c]
mov byte [eax + edx], cl
inc edx
mov ecx, dword [esp + 0x28]
cmp edx, esi
jb 0x10013700
mov eax, dword [esp + 0x10]
add eax, esi
push eax
lea eax, [esi + edi]
push eax
call fcn.10013410
mov edi, dword [esp + 0x20]
add esp, 8
mov edx, dword [esp + 0x10]
mov ecx, edi
sub ecx, edx
mov eax, edx
sub eax, edi
cmp edi, edx
mov edi, dword [esp + 0x1c]
push dword [esp + 0x18]
cmovae eax, ecx
cmp eax, 0x7fff0000
jbe 0x1001377b
lea esi, [edi + 0xc]
push esi
call fcn.10013410
sub eax, edi
sub eax, 0xc
push eax
push esi
push dword [esp + 0x1c]
call fcn.10011310
push esi
push dword [esp + 0x28]
call fcn.10013410
mov esi, dword [esp + 0x3c]
add esp, 0x1c
jmp 0x10013784
push edx
call fcn.10013410
add esp, 8
mov eax, dword [esp + 0x10]
mov dword [edi], eax
mov eax, dword [esp + 0x18]
mov dword [edi + 8], eax
lea eax, [edi + 0x2c]
push esi
push eax
push dword [esp + 0x14]
mov dword [edi + 4], esi
call fcn.10011310
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push 0x6c
push edi
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push esi
push dword [esp + 0x14]
push dword [esp + 0x14]
call fcn.10011310
add esp, 0xc
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x28]
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [edi], 0
je 0x100137f4
mov ecx, dword [esp + 0x30]
lea eax, [edi + 0x2c]
mov dword [ecx], eax
jmp 0x10013828
xor eax, eax
cmp dword [eax*4 + 0x10082648], edi
je 0x10013807
inc eax
cmp eax, 0x40
jb 0x100137f6
jmp 0x10013826
push 0x8000
push 0
push edi
mov dword [eax*4 + 0x10082648], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
dec dword [0x10082748]
xor edi, edi
call fcn.100139a0
push 0x10082630
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x44c]
xor eax, eax
test edi, edi
pop edi
setne al
pop esi
xor ecx, esp
call fcn.1001435b
mov esp, ebp
pop ebp
ret