Function at 0x10006390
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x10]
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp eax, edi
je 0x100063a5
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10058c84], eax
je 0x100063bf
mov eax, 0x10dd
pop edi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [0x10058c88]
cmp eax, edi
jne 0x100065c8
mov eax, dword [ebp + 8]
cmp eax, edi
jne 0x100063df
mov eax, 6
pop edi
mov esp, ebp
pop ebp
ret 0xc
push esi
mov esi, dword [eax]
cmp esi, edi
jne 0x10006402
pop esi
mov dword [0x10058c8c], eax
mov dword [0x10058c88], 6
mov eax, 6
pop edi
mov esp, ebp
pop ebp
ret 0xc
push ebx
mov dword [ebp - 8], edi
call fcn.10005e10
mov esi, dword [ebp + 0xc]
mov ebx, eax
mov dword [ebp - 0xc], ebx
call fcn.10005e10
mov dword [ebp + 0xc], eax
cmp eax, ebx
jne 0x10006430
cmp dword [0x10058c80], edi
jne 0x10006578
jmp 0x10006554
push 0x18
call fcn.1001f870
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x1000644d
mov dword [ebp - 4], 8
jmp 0x10006554
mov eax, ebx
call fcn.10005b20
mov edi, eax
test edi, edi
jne 0x10006466
mov dword [ebp - 4], 8
jmp 0x10006554
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1000646f
mov dword [eax], edi
mov esi, ebx
xor ebx, ebx
lea eax, [ebx + edi]
push eax
lea edx, [ebp + 0x10]
mov ecx, esi
mov dword [ebp - 4], esi
mov dword [ebp + 0x10], 0
call fcn.100066f0
cmp dword [ebp + 0x10], 0
mov esi, eax
jne 0x100064ba
mov ecx, dword [ebp - 4]
mov ebx, esi
sub ebx, dword [ebp - 0xc]
call fcn.10005ad0
test eax, eax
jne 0x100064ba
cmp ebx, 5
jl 0x10006473
cmp ebx, 0x12
jbe 0x100064d5
mov dword [ebp - 4], 6
jmp 0x10006554
cmp ebx, 5
jge 0x100064a9
cmp dword [0x10058c80], 0
mov dword [ebp - 4], 9
jne 0x1000655d
jmp 0x10006554
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp - 0xc]
mov dword [edi + 0x1c], eax
lea ecx, [ebx + esi]
mov dword [edi + 0x18], ecx
lea eax, [edi + 0x17]
lea edx, [ebx + edi + 5]
mov byte [eax], bl
sub ecx, edx
mov byte [ebx + edi], 0xe9
mov dword [ebx + edi + 1], ecx
lea ecx, [ebx + edi + 5]
call fcn.10005aa0
lea ecx, [ebp - 0x10]
push ecx
push 0x40
push ebx
push esi
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1000654b
mov ecx, esi
call fcn.10005d60
mov ebx, eax
test ebx, ebx
je 0x1000659b
mov edx, 0x6544
cmp word [ebx + 0x1c], dx
je 0x1000659b
lea eax, [ebp + 0xc]
push eax
push 0x40
push 0x40
push ebx
mov dword [ebp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1000658d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [0x10058c88], ecx
test edi, edi
je 0x10006568
mov eax, edi
call fcn.10005d30
mov eax, dword [ebp - 8]
test eax, eax
je 0x10006578
push eax
call fcn.1001f865
add esp, 4
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
pop ebx
pop esi
mov dword [0x10058c8c], edx
pop edi
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebx + 0x1c], 0x6f746544
mov dword [ebx + 0x20], 0x21737275
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
mov dword [eax + 8], ecx
mov ecx, dword [0x10058c94]
mov dword [eax + 0xc], esi
mov dword [eax + 4], 0
mov dword [eax + 0x10], edi
mov edx, dword [ebp - 0x10]
pop ebx
mov dword [eax + 0x14], edx
mov dword [eax], ecx
mov dword [0x10058c94], eax
xor eax, eax
pop esi
pop edi
mov esp, ebp
pop ebp
ret 0xc