Function at 0x40b490
Capabilities:
Allocate or change rwx memory

Disassembly:
sub esp, 0x18
push esi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x43c65c], eax
je 0x40b4b0
mov eax, 0x10dd
pop esi
add esp, 0x18
ret 8
mov eax, dword [0x43c660]
cmp eax, esi
jne 0x40b6ea
push ebx
mov ebx, dword [esp + 0x24]
cmp ebx, esi
jne 0x40b4d3
pop ebx
mov eax, 6
pop esi
add esp, 0x18
ret 8
mov ecx, dword [ebx]
cmp ecx, esi
jne 0x40b4f1
mov dword [0x43c664], ebx
mov eax, 6
pop ebx
mov dword [0x43c660], eax
pop esi
add esp, 0x18
ret 8
push ebp
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
call fcn.0040afb0
mov ecx, dword [esp + 0x30]
mov edi, eax
call fcn.0040afb0
cmp eax, edi
mov dword [esp + 0x30], eax
jne 0x40b524
cmp dword [0x43c654], esi
jne 0x40b6df
jmp 0x40b6b7
push 0x18
call fcn.0040caec
add esp, 4
cmp eax, esi
mov dword [esp + 0x18], eax
jne 0x40b540
mov esi, 8
jmp 0x40b6b7
mov eax, edi
call fcn.0040ad90
cmp eax, esi
mov dword [esp + 0x10], eax
jne 0x40b559
mov esi, 8
jmp 0x40b6b7
xor ecx, ecx
mov dword [eax + 0x38], ecx
mov dword [eax + 0x3c], ecx
mov ebx, eax
add eax, 0x1e
mov esi, edi
mov dword [esp + 0x24], eax
jmp 0x40b574
mov ebx, dword [esp + 0x14]
push ebx
lea edx, [esp + 0x20]
mov ecx, esi
mov ebp, esi
mov dword [esp + 0x20], 0
call fcn.0040b700
mov esi, eax
mov eax, dword [esp + 0x1c]
sub eax, ebp
add eax, esi
add ebx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ebx
mov cl, byte [esp + 0x14]
sub cl, al
add cl, cl
mov ebx, esi
add cl, cl
sub ebx, edi
mov dl, bl
add cl, cl
and dl, 7
xor cl, dl
mov byte [eax + 0x38], cl
mov ecx, ebp
call fcn.0040ab20
test eax, eax
jne 0x40b5ca
cmp ebx, 5
jb 0x40b570
jmp 0x40b5ec
cmp ebx, 5
jae 0x40b5ec
nop
cmp byte [esi], 0x90
jne 0x40b5e3
add esi, 1
mov ebx, esi
sub ebx, edi
cmp ebx, 5
jb 0x40b5d0
jmp 0x40b5ec
cmp ebx, 5
jb 0x40b6a9
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
cmp eax, esi
jbe 0x40b5f9
int3
mov ecx, dword [esp + 0x10]
sub al, cl
push ebx
mov byte [ecx + 0x36], bl
add ecx, 0x20
push edi
push ecx
mov byte [esi], al
call fcn.004105c0
add esp, 0xc
cmp ebx, 0x19
jbe 0x40b621
mov esi, 6
jmp 0x40b6b7
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
mov dword [edx + 0x44], eax
movzx eax, byte [esi]
add eax, edx
lea ecx, [ebx + edi]
mov dword [edx + 0x40], ecx
lea edx, [eax + 5]
mov byte [eax], 0xe9
add eax, 1
sub ecx, edx
mov dword [eax], ecx
lea ecx, [eax + 4]
mov eax, esi
call fcn.0040aaf0
lea ecx, [esp + 0x20]
push ecx
push 0x40
push ebx
xor esi, esi
push edi
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40b671
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x40b6b7
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
mov dword [eax + 0xc], edi
pop edi
mov dword [eax + 4], esi
mov dword [eax + 0x10], ecx
mov ecx, dword [0x43c66c]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x1c]
pop ebp
pop ebx
mov dword [eax + 0x14], edx
mov dword [eax], ecx
mov dword [0x43c66c], eax
xor eax, eax
pop esi
add esp, 0x18
ret 8
cmp dword [0x43c654], 0
mov esi, 9
jne 0x40b6bd
mov dword [0x43c660], esi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x40b6ca
call fcn.0040af10
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40b6db
push eax
call fcn.0040c4fa
add esp, 4
mov ebx, dword [esp + 0x2c]
pop edi
pop ebp
mov dword [0x43c664], ebx
mov eax, esi
pop ebx
pop esi
add esp, 0x18
ret 8