Function at 0x10015bb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, 0x100049e0
push ebx
push esi
xor esi, esi
push edi
test eax, eax
jne 0x10015bd0
lea eax, [esi + 0x57]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x100cffdc], eax
je 0x10015bec
mov eax, 0x10dd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [0x100cffe0]
test eax, eax
jne 0x10015e39
mov ecx, dword [0x100cffc0]
test ecx, ecx
jne 0x10015c23
mov dword [0x100cffe0], 6
lea eax, [ecx + 6]
mov dword [0x100cffc4], 0x100cffc0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0xc], esi
xor edi, edi
call fcn.10015060
mov ebx, eax
mov ecx, 0x100049e0
mov dword [ebp - 4], ebx
call fcn.10015060
mov dword [ebp - 0x28], eax
cmp eax, ebx
jne 0x10015c54
cmp dword [0x100cffe4], esi
jne 0x10015e2d
jmp 0x10015e0b
push 0x18
call dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
mov edi, eax
add esp, 4
test edi, edi
jne 0x10015c6d
lea esi, [eax + 8]
jmp 0x10015e0b
mov ecx, ebx
call fcn.100155a0
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x10015c85
lea esi, [eax + 8]
jmp 0x10015e0b
mov esi, dword [ebp - 4]
lea eax, [ebx + 0x38]
xorps xmm0, xmm0
mov dword [ebp - 0x1c], eax
movq qword [eax], xmm0
mov edx, ebx
lea eax, [ebx + 0x1e]
mov dword [ebp - 8], edx
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push ecx
mov ebx, esi
mov ecx, edx
push esi
mov dword [ebp - 0x20], ebx
call fcn.100a4700
mov ecx, dword [ebp - 8]
mov esi, eax
mov eax, dword [ebp - 0x14]
sub eax, ebx
mov ebx, esi
sub ebx, dword [ebp - 4]
add eax, esi
add ecx, eax
mov al, bl
mov dl, cl
mov dword [ebp - 8], ecx
sub dl, byte [ebp - 0xc]
and al, 7
mov ecx, dword [ebp - 0x1c]
shl dl, 3
xor dl, al
mov eax, dword [ebp - 0x10]
mov byte [ecx + eax], dl
inc eax
mov dword [ebp - 0x10], eax
cmp eax, 8
jae 0x10015d0a
mov ecx, dword [ebp - 0x20]
call fcn.10015160
test eax, eax
jne 0x10015d0a
mov edx, dword [ebp - 8]
cmp ebx, 5
jb 0x10015ca5
jmp 0x10015d3a
cmp ebx, 5
jae 0x10015d37
nop
mov ecx, esi
call fcn.100151c0
test eax, eax
je 0x10015d2e
mov ecx, dword [ebp - 4]
add esi, eax
mov ebx, esi
sub ebx, ecx
cmp ebx, 5
jb 0x10015d10
mov edx, dword [ebp - 8]
jmp 0x10015d3d
cmp ebx, 5
jb 0x10015dfd
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
cmp dword [ebp - 0x10], 8
ja 0x10015dfd
mov esi, dword [ebp - 0x24]
cmp edx, esi
jbe 0x10015d4f
int3
mov eax, dword [ebp - 0xc]
sub dl, al
push ebx
push ecx
mov byte [esi], dl
mov byte [eax + 0x36], bl
add eax, 0x20
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
cmp ebx, 0x19
jbe 0x10015d76
mov esi, 6
jmp 0x10015e0b
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x28]
lea edx, [eax + 0x1e]
mov esi, dword [ebp - 4]
add esi, ebx
mov dword [eax + 0x44], ecx
movzx ecx, byte [edx]
add ecx, eax
mov dword [eax + 0x40], esi
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub esi, eax
mov dword [ecx + 1], esi
add ecx, 5
call fcn.10015030
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0x40
push ebx
mov ebx, dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10015dc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10015e0b
mov eax, dword [ebp - 0xc]
mov dword [edi + 0x10], eax
mov dword [edi + 4], 0
mov dword [edi + 8], 0x100cffc0
mov dword [edi + 0xc], ebx
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x14], eax
mov eax, dword [0x100cffd4]
mov dword [edi], eax
xor eax, eax
mov dword [0x100cffd4], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [0x100cffe4], 0
mov esi, 9
jne 0x10015e11
mov dword [0x100cffe0], esi
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10015e1f
mov ecx, eax
call fcn.100156b0
test edi, edi
je 0x10015e2d
push edi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, esi
mov dword [0x100cffc4], 0x100cffc0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc