Function at 0x4b85f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x180
push ebx
push esi
push edi
lea edi, [ebp - 0xc0]
mov ecx, 0x30
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov ecx, 0x563062
call fcn.004d007c
mov dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
je 0x4b862e
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
cmp dword [ebp + 0x14], 0
je 0x4b863d
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
cmp dword [ebp + 0x18], 0
je 0x4b864c
mov eax, dword [ebp + 0x18]
mov dword [eax], 0
cmp dword [ebp + 0xc], 0
jne 0x4b865c
mov eax, 0x57
jmp 0x4b8a6d
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, esp
call fcn.004d0059
cmp dword [0x561e8c], eax
je 0x4b867d
mov eax, 0x10dd
jmp 0x4b8a6d
cmp dword [0x561e90], 0
je 0x4b8690
mov eax, dword [0x561e90]
jmp 0x4b8a6d
cmp dword [ebp + 8], 0
jne 0x4b86a0
mov eax, 6
jmp 0x4b8a6d
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x4b86c7
mov dword [ebp - 8], 6
mov eax, dword [ebp - 8]
mov dword [0x561e90], eax
mov eax, dword [ebp + 8]
mov dword [0x561e94], eax
mov eax, dword [ebp - 8]
jmp 0x4b8a6d
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 0
push 0
mov eax, dword [ebp - 0x14]
push eax
call fcn.004b8ae0
mov dword [ebp - 0x14], eax
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.004b8ae0
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x14]
jne 0x4b8714
cmp dword [0x561e84], 0
je 0x4b8710
jmp 0x4b875e
jmp 0x4b8756
cmp dword [ebp + 0x14], 0
je 0x4b8722
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
cmp dword [ebp + 0x18], 0
je 0x4b8730
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [eax], ecx
push 0x18
call fcn.004cef99
add esp, 4
mov dword [ebp - 0x170], eax
mov eax, dword [ebp - 0x170]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x4b87bd
mov dword [ebp - 8], 8
mov eax, dword [ebp - 8]
mov dword [0x561e90], eax
cmp dword [ebp - 0x20], 0
je 0x4b8786
mov eax, dword [ebp - 0x20]
push eax
call fcn.004b77f0
add esp, 4
mov dword [ebp - 0x20], 0
cmp dword [ebp + 0x10], 0
je 0x4b8786
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
cmp dword [ebp - 0x2c], 0
je 0x4b87ad
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x17c], eax
push 0x18
mov ecx, dword [ebp - 0x17c]
push ecx
call fcn.004cefc9
add esp, 8
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp + 8]
mov dword [0x561e94], eax
mov eax, dword [ebp - 8]
jmp 0x4b8a6d
mov eax, dword [ebp - 0x14]
push eax
call fcn.004b72e0
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4b87de
mov dword [ebp - 8], 8
jmp 0x4b8756
cmp dword [ebp + 0x10], 0
je 0x4b87ec
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
push 8
push 0
mov eax, dword [ebp - 0x20]
add eax, 0x38
push eax
call fcn.004d1bb0
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
add eax, 0x1e
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x68], 5
mov dword [ebp - 0x74], 0
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x68]
jae 0x4b88e3
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x8c], 0
lea eax, [ebp - 0x8c]
push eax
push 0
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x50]
push edx
mov eax, dword [ebp - 0x44]
push eax
call fcn.004bb0a0
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x80]
add eax, dword [ebp - 0x8c]
add eax, dword [ebp - 0x44]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x5c], eax
mov al, byte [ebp - 0x5c]
and al, 7
mov ecx, dword [ebp - 0x20]
add ecx, dword [ebp - 0x74]
mov dl, byte [ecx + 0x38]
and dl, 0xf8
or dl, al
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x74]
mov byte [eax + 0x38], dl
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x20]
and al, 0x1f
shl al, 3
mov ecx, dword [ebp - 0x20]
add ecx, dword [ebp - 0x74]
mov dl, byte [ecx + 0x38]
and dl, 7
or dl, al
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x74]
mov byte [eax + 0x38], dl
mov eax, dword [ebp - 0x74]
add eax, 1
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 8
jb 0x4b88cc
jmp 0x4b88e3
mov eax, dword [ebp - 0x80]
push eax
call fcn.004b7540
add esp, 4
test eax, eax
je 0x4b88de
jmp 0x4b88e3
jmp 0x4b8829
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x68]
jae 0x4b891f
mov eax, dword [ebp - 0x38]
push eax
call fcn.004b79e0
add esp, 4
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
jne 0x4b8908
jmp 0x4b891f
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x98]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x5c], eax
jmp 0x4b88e3
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x68]
jb 0x4b892d
cmp dword [ebp - 0x74], 8
jbe 0x4b8949
mov dword [ebp - 8], 9
cmp dword [0x561e84], 0
je 0x4b8944
jmp 0x4b875e
jmp 0x4b8756
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x50]
jbe 0x4b8952
int3
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov byte [ecx + 0x1e], al
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp - 0x5c]
mov byte [eax + 0x36], cl
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x20]
add edx, 0x20
push edx
call fcn.004d1630
add esp, 0xc
mov eax, 0x1e
sub eax, dword [ebp - 0x68]
cmp dword [ebp - 0x5c], eax
jbe 0x4b8997
mov dword [ebp - 8], 6
jmp 0x4b8756
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x40], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x44], ecx
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax + 0x1e]
add ecx, dword [ebp - 0x20]
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x40]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.004b7970
add esp, 8
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x50]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.004b7910
add esp, 8
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xa4], 0
mov esi, esp
lea eax, [ebp - 0xa4]
push eax
push 0x40
mov ecx, dword [ebp - 0x5c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.004d0059
test eax, eax
jne 0x4b8a27
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.004d0059
mov dword [ebp - 8], eax
jmp 0x4b8756
mov eax, dword [ebp - 0x2c]
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 8]
mov dword [eax + 8], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0xa4]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [0x561e9c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x2c]
mov dword [0x561e9c], eax
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x4b8a94]
call fcn.004d0005
pop eax
pop edx
pop edi
pop esi
pop ebx
add esp, 0x180
cmp ebp, esp
call fcn.004d0059
mov esp, ebp
pop ebp
ret 0x14