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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10a8
call fcn.1005fc60
mov eax, dword [0x100b5540]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1018b5d4]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x1018b364]
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x101c], ebx
mov dword [ebp - 0x1034], edi
mov dword [ebp - 0x1024], ecx
cmp eax, dword [ecx + 4]
jg 0x1005dd0e
cmp dword [ebp + 0x14], 0
mov eax, 1
mov dword [ebp - 0x1014], eax
je 0x1005d9b1
test esi, esi
je 0x1005d9b1
push dword [ebp + 0x10]
push ebx
push esi
call fcn.1005d7f0
add esp, 0xc
test eax, eax
jne 0x1005d9ac
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005f68b
mov esp, ebp
pop ebp
ret
mov eax, 1
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1005dcfd
nop dword [eax]
mov edx, dword [ebp - 0x1024]
mov esi, 0x1000
mov eax, dword [0x1018b35c]
cmp ecx, esi
cmovb esi, ecx
mov ecx, esi
mov dword [ebp - 0x1030], esi
mov dword [ebp - 0x1008], ecx
cmp eax, dword [edx + 4]
jg 0x1005dd63
jmp 0x1005d9f7
mov ecx, dword [ebp - 0x1008]
mov dword [ebp - 0x1020], 0
mov eax, 1
mov dword [ebp - 0x1010], 0
lea ebx, [ebp - 0x1004]
mov dword [ebp - 0x100c], eax
test esi, esi
je 0x1005db53
mov esi, dword [0x1018b358]
xor edx, edx
mov eax, edi
div esi
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
test edi, edi
je 0x1005da98
push 0x1c
lea eax, [ebp - 0x1050]
mov dword [ebp - 0x1038], 0
xorps xmm0, xmm0
push eax
push edi
movups xmmword [ebp - 0x1050], xmm0
movq qword [ebp - 0x1040], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1005da98
cmp dword [ebp - 0x1040], 0x1000
jne 0x1005da98
test byte [ebp - 0x103c], 0xee
je 0x1005da98
mov ecx, dword [ebp - 0x1044]
cmp esi, ecx
ja 0x1005da98
mov eax, edi
sub ecx, esi
sub eax, dword [ebp - 0x1050]
cmp eax, ecx
jbe 0x1005dabf
lea eax, [ebp - 0x1020]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1005dab5
mov dword [ebp - 0x100c], eax
jmp 0x1005dabf
mov dword [ebp - 0x1010], 1
lea eax, [ebp - 0x1018]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x1005dae4
xor ecx, ecx
mov dword [ebp - 0x1018], ecx
jmp 0x1005daea
mov ecx, dword [ebp - 0x1018]
cmp dword [ebp - 0x1010], 0
je 0x1005db0e
lea eax, [ebp - 0x105c]
push eax
push dword [ebp - 0x1020]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 0x1018]
cmp ecx, esi
je 0x1005db2f
mov eax, esi
sub eax, ecx
push eax
lea eax, [ecx + ebx]
push 0
push eax
call fcn.10061070
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x100c], eax
jmp 0x1005db35
mov eax, dword [ebp - 0x100c]
mov ecx, dword [ebp - 0x1008]
add ebx, esi
add edi, esi
sub ecx, esi
mov dword [ebp - 0x1008], ecx
jne 0x1005da24
mov esi, dword [ebp - 0x1030]
mov edx, dword [ebp - 0x1024]
xor ecx, ecx
test eax, eax
mov eax, dword [0x1018b354]
cmovne ecx, dword [ebp - 0x1014]
mov dword [ebp - 0x1014], ecx
mov ecx, esi
mov dword [ebp - 0x1008], ecx
cmp eax, dword [edx + 4]
jg 0x1005ddb8
jmp 0x1005db8b
mov ecx, dword [ebp - 0x1008]
mov edi, dword [ebp - 0x101c]
lea eax, [ebp - 0x1004]
mov dword [ebp - 0x100c], eax
mov ebx, 1
mov dword [ebp - 0x1028], 0
mov dword [ebp - 0x1010], 0
test esi, esi
je 0x1005dcc8
nop
mov esi, dword [0x1018b350]
xor edx, edx
mov eax, edi
div esi
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
test edi, edi
je 0x1005dc34
push 0x1c
lea eax, [ebp - 0x1050]
mov dword [ebp - 0x1038], 0
xorps xmm0, xmm0
push eax
push edi
movups xmmword [ebp - 0x1050], xmm0
movq qword [ebp - 0x1040], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1005dc34
cmp dword [ebp - 0x1040], 0x1000
jne 0x1005dc34
test byte [ebp - 0x103c], 0xcc
je 0x1005dc34
mov ecx, dword [ebp - 0x1044]
cmp esi, ecx
ja 0x1005dc34
mov eax, edi
sub ecx, esi
sub eax, dword [ebp - 0x1050]
cmp eax, ecx
jbe 0x1005dc57
lea eax, [ebp - 0x1028]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1005dc4d
xor ebx, ebx
jmp 0x1005dc57
mov dword [ebp - 0x1010], 1
lea eax, [ebp - 0x102c]
push eax
push esi
push dword [ebp - 0x100c]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x1005dc7d
mov dword [ebp - 0x102c], eax
cmp dword [ebp - 0x1010], 0
je 0x1005dc9b
lea eax, [ebp - 0x1060]
push eax
push dword [ebp - 0x1028]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 0x1008]
xor eax, eax
cmp dword [ebp - 0x102c], esi
cmovne ebx, eax
add dword [ebp - 0x100c], esi
add edi, esi
sub ecx, esi
mov dword [ebp - 0x1008], ecx
jne 0x1005dbc0
mov esi, dword [ebp - 0x1030]
mov ecx, dword [ebp + 0x10]
xor eax, eax
mov edi, dword [ebp - 0x1034]
test ebx, ebx
cmovne eax, dword [ebp - 0x1014]
sub ecx, esi
add dword [ebp - 0x101c], esi
add edi, esi
mov dword [ebp - 0x1014], eax
mov dword [ebp + 0x10], ecx
mov dword [ebp - 0x1034], edi
test ecx, ecx
jne 0x1005d9c0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005f68b
mov esp, ebp
pop ebp
ret
push 0x1018b364
call fcn.1005fbf7
add esp, 4
cmp dword [0x1018b364], 0xffffffff
jne 0x1005d975
mov eax, dword [0x100b54b0]
cmp eax, 0xffffffff
jne 0x1005dd4c
lea eax, [ebp - 0x1058]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x1054]
mov dword [0x100b54b0], eax
jmp 0x1005dd4c
push 0x1018b364
mov dword [0x1018b360], eax
call fcn.1005fba6
add esp, 4
jmp 0x1005d975
push 0x1018b35c
call fcn.1005fbf7
add esp, 4
cmp dword [0x1018b35c], 0xffffffff
jne 0x1005d9f1
mov eax, dword [0x100b54b0]
cmp eax, 0xffffffff
jne 0x1005dda1
lea eax, [ebp - 0x1084]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x1080]
mov dword [0x100b54b0], eax
jmp 0x1005dda1
push 0x1018b35c
mov dword [0x1018b358], eax
call fcn.1005fba6
add esp, 4
jmp 0x1005d9f1
push 0x1018b354
call fcn.1005fbf7
add esp, 4
cmp dword [0x1018b354], 0xffffffff
jne 0x1005db85
mov eax, dword [0x100b54b0]
cmp eax, 0xffffffff
jne 0x1005ddf6
lea eax, [ebp - 0x10a8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x10a4]
mov dword [0x100b54b0], eax
jmp 0x1005ddf6
push 0x1018b354
mov dword [0x1018b350], eax
call fcn.1005fba6
add esp, 4
jmp 0x1005db85