Function at 0x40a192
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov ebx, ecx
mov dword [ebp - 0x10], edx
push edi
mov dword [ebp - 0x14], ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x463ec0], eax
je 0x40a1bc
mov eax, 0x10dd
jmp 0x40a3a5
mov eax, dword [0x463ebc]
test eax, eax
jne 0x40a3a5
test ebx, ebx
jne 0x40a1d5
push 6
pop eax
jmp 0x40a3a5
mov ecx, dword [ebx]
push esi
test ecx, ecx
jne 0x40a1ea
push 6
pop edi
mov dword [0x463ebc], edi
jmp 0x40a362
mov esi, edi
mov ebx, edi
call fcn.00409dd6
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 4], eax
call fcn.00409dd6
mov dword [ebp - 0x24], eax
cmp eax, dword [ebp - 4]
jne 0x40a217
cmp dword [0x463ec4], ebx
jne 0x40a35f
jmp 0x40a343
push 0x18
call fcn.004021d7
mov ebx, eax
mov dword [ebp - 0x20], ebx
pop ecx
test ebx, ebx
jne 0x40a230
push 8
pop edi
jmp 0x40a343
mov ecx, dword [ebp - 4]
call fcn.00409b6e
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
je 0x40a228
mov eax, dword [ebp - 4]
mov ebx, edi
mov dword [ebp - 0xc], ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 0xc], eax
push ecx
push ecx
lea ecx, [ebx + esi]
mov dword [ebp - 0x10], edi
mov edx, eax
call fcn.0040a3ad
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], edi
jne 0x40a27f
mov ecx, dword [ebp - 0xc]
mov ebx, eax
sub ebx, dword [ebp - 4]
call fcn.00409af8
test eax, eax
jne 0x40a27f
mov eax, dword [ebp - 0x1c]
cmp ebx, 5
jl 0x40a249
mov dword [ebp - 0xc], ebx
cmp ebx, 5
mov ebx, dword [ebp - 0x20]
jge 0x40a29f
cmp dword [0x463ec4], 0
push 9
pop edi
jne 0x40a349
jmp 0x40a343
mov eax, dword [ebp - 0xc]
cmp eax, 0x12
jbe 0x40a2ae
push 6
jmp 0x40a22a
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x24]
add edx, eax
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], ecx
add esi, 0x17
mov ecx, dword [ebp - 8]
add ecx, eax
mov byte [esi], al
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
mov eax, edi
and dword [ebp - 0x24], eax
mov dword [ecx + 1], edx
add ecx, 5
mov edx, esi
sub edx, ecx
cmp ecx, esi
cmova edx, dword [ebp - 0x24]
test edx, edx
je 0x40a2f0
mov byte [ecx], 0xcc
inc ecx
inc eax
cmp eax, edx
jb 0x40a2e7
mov esi, dword [ebp - 4]
lea eax, [ebp - 0x18]
push eax
push 0x40
push dword [ebp - 0xc]
mov dword [ebp - 0x18], edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40a338
mov ecx, esi
call fcn.00409d75
mov esi, eax
test esi, esi
je 0x40a37a
mov eax, 0x6544
cmp word [esi + 0x1c], ax
je 0x40a37a
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], edi
push eax
push 0x40
push 0x40
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40a36c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 8]
mov edi, eax
mov dword [0x463ebc], edi
test esi, esi
je 0x40a354
mov ecx, esi
call fcn.00409d54
test ebx, ebx
je 0x40a35f
push ebx
call fcn.0042d790
pop ecx
mov ebx, dword [ebp - 0x14]
mov dword [0x463ea8], ebx
mov eax, edi
jmp 0x40a3a4
mov dword [esi + 0x1c], 0x6f746544
mov dword [esi + 0x20], 0x21737275
mov eax, dword [ebp - 0x14]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 8]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 4]
mov dword [ebx + 0xc], eax
mov dword [ebx + 4], edi
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0x14], eax
mov eax, dword [0x463eb4]
mov dword [ebx], eax
xor eax, eax
mov dword [0x463eb4], ebx
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0xc