Function at 0x10006040
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], 0
test eax, eax
je 0x1000605a
mov dword [eax], 0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x10006067
mov dword [eax], 0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x10006074
mov dword [eax], 0
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x10006086
lea eax, [edi + 0x57]
pop edi
mov esp, ebp
pop ebp
ret 0x14
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x100b1ef8], eax
je 0x1000609f
mov eax, 0x10dd
pop edi
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [0x100b1efc]
test eax, eax
jne 0x1000644b
mov eax, dword [ebp + 8]
test eax, eax
jne 0x100060bf
mov eax, 6
pop edi
mov esp, ebp
pop ebp
ret 0x14
push esi
mov esi, dword [eax]
test esi, esi
jne 0x100060e0
mov dword [0x100b1f00], eax
lea eax, [esi + 6]
pop esi
mov dword [0x100b1efc], 6
pop edi
mov esp, ebp
pop ebp
ret 0x14
push ebx
xor ebx, ebx
mov dword [ebp - 8], 0
cmp byte [esi], 0xff
jne 0x1000610e
cmp byte [esi + 1], 0x25
jne 0x1000610e
mov eax, dword [esi + 2]
push eax
push esi
mov dword [ebp + 0xc], eax
call fcn.10005ec0
add esp, 8
test al, al
je 0x1000610e
mov esi, dword [ebp + 0xc]
mov esi, dword [esi]
cmp byte [esi], 0xeb
jne 0x1000614f
movsx eax, byte [esi + 1]
add esi, 2
add esi, eax
mov al, byte [esi]
cmp al, 0xff
jne 0x10006143
cmp byte [esi + 1], 0x25
jne 0x10006143
mov eax, dword [esi + 2]
push eax
push esi
mov dword [ebp + 0xc], eax
call fcn.10005ec0
add esp, 8
test al, al
je 0x1000614f
mov esi, dword [ebp + 0xc]
mov esi, dword [esi]
jmp 0x1000614f
cmp al, 0xe9
jne 0x1000614f
mov eax, dword [esi + 1]
add esi, 5
add esi, eax
cmp byte [edi], 0xff
jne 0x10006173
cmp byte [edi + 1], 0x25
jne 0x10006173
mov eax, dword [edi + 2]
push eax
push edi
mov dword [ebp + 0xc], eax
call fcn.10005ec0
add esp, 8
test al, al
je 0x10006173
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
cmp byte [edi], 0xeb
jne 0x100061b4
movsx eax, byte [edi + 1]
add edi, 2
add edi, eax
mov al, byte [edi]
cmp al, 0xff
jne 0x100061a8
cmp byte [edi + 1], 0x25
jne 0x100061a8
mov eax, dword [edi + 2]
push eax
push edi
mov dword [ebp + 0xc], eax
call fcn.10005ec0
add esp, 8
test al, al
je 0x100061b4
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
jmp 0x100061b4
cmp al, 0xe9
jne 0x100061b4
mov eax, dword [edi + 1]
add edi, 5
add edi, eax
cmp edi, esi
jne 0x100061d0
cmp dword [0x100b1ef0], ebx
jne 0x10006424
xor eax, eax
mov dword [0x100b1efc], eax
jmp 0x100063fa
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x100061d9
mov dword [eax], esi
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x100061e2
mov dword [eax], edi
push 0x18
call fcn.10060cb0
mov ebx, eax
add esp, 4
mov dword [ebp + 0xc], ebx
test ebx, ebx
jne 0x10006207
mov eax, 8
mov dword [ebp - 4], eax
mov dword [0x100b1efc], eax
jmp 0x100063fa
push esi
call fcn.10005a10
mov ebx, eax
add esp, 4
mov dword [ebp - 8], ebx
test ebx, ebx
jne 0x1000622e
mov ebx, dword [ebp + 0xc]
mov eax, 8
mov dword [ebp - 4], eax
mov dword [0x100b1efc], eax
jmp 0x100063fa
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10006237
mov dword [eax], ebx
lea eax, [ebx + 0x38]
xorps xmm0, xmm0
lea edx, [ebx + 0x1e]
movq qword [eax], xmm0
mov dword [ebp - 0x14], edx
mov ecx, ebx
xor edx, edx
mov dword [ebp - 0x20], eax
mov eax, esi
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], edx
jmp 0x10006260
lea edx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push edx
push 0
push eax
mov ebx, eax
lea eax, [ebp - 0x14]
push eax
push ecx
mov dword [ebp - 0x24], ebx
call fcn.10007310
mov ecx, dword [ebp - 4]
mov edx, eax
mov eax, dword [ebp - 0x18]
sub eax, ebx
mov dword [ebp - 0xc], edx
add eax, edx
mov ebx, edx
mov edx, dword [ebp - 0x20]
add ecx, eax
mov dword [ebp - 4], ecx
sub ebx, esi
sub cl, byte [ebp - 8]
mov al, bl
and al, 7
shl cl, 3
xor cl, al
mov eax, dword [ebp - 0x10]
mov byte [edx + eax], cl
inc eax
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
cmp eax, 8
jae 0x100062d5
push dword [ebp - 0x24]
call fcn.10005b20
add esp, 4
test eax, eax
jne 0x100062d2
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp ebx, 5
jb 0x10006260
jmp 0x1000630c
mov edx, dword [ebp - 0xc]
cmp ebx, 5
jae 0x10006309
lea ebx, [ebx]
push edx
call fcn.10005cf0
add esp, 4
test eax, eax
je 0x10006300
mov edx, dword [ebp - 0xc]
add edx, eax
mov ebx, edx
mov dword [ebp - 0xc], edx
sub ebx, esi
cmp ebx, 5
jb 0x100062e0
jmp 0x10006309
cmp ebx, 5
jb 0x100063dc
mov ecx, dword [ebp - 4]
cmp dword [ebp - 0x10], 8
ja 0x100063dc
cmp ecx, dword [ebp - 0x14]
jbe 0x1000631c
int3
mov eax, dword [ebp - 8]
sub cl, al
push ebx
push esi
mov byte [eax + 0x1e], cl
mov byte [eax + 0x36], bl
add eax, 0x20
push eax
call fcn.10060eb0
add esp, 0xc
cmp ebx, 0x19
jbe 0x1000634f
mov ebx, dword [ebp + 0xc]
mov eax, 6
mov dword [ebp - 4], eax
mov dword [0x100b1efc], eax
jmp 0x100063fa
mov eax, dword [ebp - 8]
lea edx, [esi + ebx]
movzx ecx, byte [eax + 0x1e]
add ecx, eax
mov dword [eax + 0x40], edx
mov dword [eax + 0x44], edi
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
lea eax, [ecx + 5]
mov dword [ecx + 1], edx
push dword [ebp - 0x14]
push eax
call fcn.10005cc0
add esp, 8
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
push 0x40
push ebx
push esi
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x100063a5
call sub.KERNEL32.dll_GetLastError
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov dword [0x100b1efc], eax
jmp 0x100063fa
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
pop ebx
mov dword [ecx + 8], eax
mov eax, dword [ebp - 8]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0xc], esi
mov dword [ecx + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [ecx + 0x14], eax
mov eax, dword [0x100b1f08]
pop esi
mov dword [ecx], eax
xor eax, eax
mov dword [0x100b1f08], ecx
pop edi
mov esp, ebp
pop ebp
ret 0x14
cmp dword [0x100b1ef0], 0
mov eax, 9
mov dword [ebp - 4], eax
jne 0x100063f7
mov ebx, dword [ebp + 0xc]
mov dword [0x100b1efc], eax
jmp 0x100063fa
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 8]
test eax, eax
je 0x10006417
push eax
call fcn.10005c20
mov eax, dword [ebp + 0x10]
add esp, 4
test eax, eax
je 0x10006417
mov dword [eax], 0
test ebx, ebx
je 0x10006424
push ebx
call fcn.10060d01
add esp, 4
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x10006431
mov dword [eax], 0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1000643e
mov dword [eax], 0
mov eax, dword [ebp + 8]
pop ebx
mov dword [0x100b1f00], eax
mov eax, dword [ebp - 4]
pop esi
pop edi
mov esp, ebp
pop ebp
ret 0x14