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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10a8
call fcn.10059570
mov eax, dword [0x100ad540]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [0x101825bc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x10182350]
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 0x1005762e
cmp dword [ebp + 0x14], 0
mov eax, 1
mov dword [ebp - 0x1014], eax
je 0x100572d1
test esi, esi
je 0x100572d1
push dword [ebp + 0x10]
push ebx
push esi
call fcn.10057110
add esp, 0xc
test eax, eax
jne 0x100572cc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10058f9b
mov esp, ebp
pop ebp
ret
mov eax, 1
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1005761d
nop dword [eax]
mov edx, dword [ebp - 0x1024]
mov esi, 0x1000
mov eax, dword [0x10182348]
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 0x10057683
jmp 0x10057317
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 0x10057473
mov esi, dword [0x10182344]
xor edx, edx
mov eax, edi
div esi
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
test edi, edi
je 0x100573b8
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 0x100573b8
cmp dword [ebp - 0x1040], 0x1000
jne 0x100573b8
test byte [ebp - 0x103c], 0xee
je 0x100573b8
mov ecx, dword [ebp - 0x1044]
cmp esi, ecx
ja 0x100573b8
mov eax, edi
sub ecx, esi
sub eax, dword [ebp - 0x1050]
cmp eax, ecx
jbe 0x100573df
lea eax, [ebp - 0x1020]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100573d5
mov dword [ebp - 0x100c], eax
jmp 0x100573df
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 0x10057404
xor ecx, ecx
mov dword [ebp - 0x1018], ecx
jmp 0x1005740a
mov ecx, dword [ebp - 0x1018]
cmp dword [ebp - 0x1010], 0
je 0x1005742e
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 0x1005744f
mov eax, esi
sub eax, ecx
push eax
lea eax, [ecx + ebx]
push 0
push eax
call fcn.1005a980
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x100c], eax
jmp 0x10057455
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 0x10057344
mov esi, dword [ebp - 0x1030]
mov edx, dword [ebp - 0x1024]
xor ecx, ecx
test eax, eax
mov eax, dword [0x10182340]
cmovne ecx, dword [ebp - 0x1014]
mov dword [ebp - 0x1014], ecx
mov ecx, esi
mov dword [ebp - 0x1008], ecx
cmp eax, dword [edx + 4]
jg 0x100576d8
jmp 0x100574ab
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 0x100575e8
nop
mov esi, dword [0x1018233c]
xor edx, edx
mov eax, edi
div esi
sub esi, edx
cmp ecx, esi
cmovle esi, ecx
test edi, edi
je 0x10057554
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 0x10057554
cmp dword [ebp - 0x1040], 0x1000
jne 0x10057554
test byte [ebp - 0x103c], 0xcc
je 0x10057554
mov ecx, dword [ebp - 0x1044]
cmp esi, ecx
ja 0x10057554
mov eax, edi
sub ecx, esi
sub eax, dword [ebp - 0x1050]
cmp eax, ecx
jbe 0x10057577
lea eax, [ebp - 0x1028]
push eax
push 0x40
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1005756d
xor ebx, ebx
jmp 0x10057577
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 0x1005759d
mov dword [ebp - 0x102c], eax
cmp dword [ebp - 0x1010], 0
je 0x100575bb
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 0x100574e0
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 0x100572e0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10058f9b
mov esp, ebp
pop ebp
ret
push 0x10182350
call fcn.10059507
add esp, 4
cmp dword [0x10182350], 0xffffffff
jne 0x10057295
mov eax, dword [0x100ad4b0]
cmp eax, 0xffffffff
jne 0x1005766c
lea eax, [ebp - 0x1058]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x1054]
mov dword [0x100ad4b0], eax
jmp 0x1005766c
push 0x10182350
mov dword [0x1018234c], eax
call fcn.100594b6
add esp, 4
jmp 0x10057295
push 0x10182348
call fcn.10059507
add esp, 4
cmp dword [0x10182348], 0xffffffff
jne 0x10057311
mov eax, dword [0x100ad4b0]
cmp eax, 0xffffffff
jne 0x100576c1
lea eax, [ebp - 0x1084]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x1080]
mov dword [0x100ad4b0], eax
jmp 0x100576c1
push 0x10182348
mov dword [0x10182344], eax
call fcn.100594b6
add esp, 4
jmp 0x10057311
push 0x10182340
call fcn.10059507
add esp, 4
cmp dword [0x10182340], 0xffffffff
jne 0x100574a5
mov eax, dword [0x100ad4b0]
cmp eax, 0xffffffff
jne 0x10057716
lea eax, [ebp - 0x10a8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x10a4]
mov dword [0x100ad4b0], eax
jmp 0x10057716
push 0x10182340
mov dword [0x1018233c], eax
call fcn.100594b6
add esp, 4
jmp 0x100574a5