Function at 0x40b328
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov eax, edx
mov ebx, ecx
push edi
xor edi, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ebx
test eax, eax
jne 0x40b34a
push 0x57
pop eax
jmp 0x40b57e
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x40f4a4], eax
je 0x40b362
mov eax, 0x10dd
jmp 0x40b57e
mov eax, dword [0x40f4a8]
test eax, eax
jne 0x40b57e
test ebx, ebx
jne 0x40b377
push 6
jmp 0x40b344
mov ecx, dword [ebx]
test ecx, ecx
jne 0x40b390
push 6
pop eax
mov dword [0x40f4a8], eax
mov dword [0x40f498], ebx
jmp 0x40b57e
push esi
mov ebx, edi
mov esi, edi
call fcn.0040adb4
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], eax
call fcn.0040adb4
mov dword [ebp - 0x24], eax
cmp eax, dword [ebp - 4]
jne 0x40b3be
cmp dword [0x40f488], ebx
jne 0x40b54a
jmp 0x40b52e
push 0x18
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jne 0x40b3e0
push 8
pop edi
jmp 0x40b52e
mov esi, dword [ebp - 4]
mov ecx, esi
call fcn.0040ac13
mov ebx, eax
test ebx, ebx
jne 0x40b3f8
push 8
pop edi
jmp 0x40b52b
mov ecx, ebx
mov dword [ebx + 0x38], edi
lea eax, [ebx + 0x1e]
mov dword [ebx + 0x3c], edi
mov edx, esi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], edi
push eax
push ecx
push edx
mov esi, edx
call fcn.0040b6a8
mov ecx, dword [ebp - 0x10]
mov edx, eax
mov eax, dword [ebp - 0x14]
sub eax, esi
mov dword [ebp - 0x20], edx
add eax, edx
add ecx, eax
mov eax, edx
sub eax, dword [ebp - 4]
mov dl, cl
sub dl, bl
mov dword [ebp - 0xc], eax
and al, 7
shl dl, 3
or dl, al
mov dword [ebp - 0x10], ecx
mov ecx, esi
mov byte [ebx + 0x38], dl
call fcn.0040aa61
test eax, eax
mov eax, dword [ebp - 0xc]
jne 0x40b45e
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x20]
cmp eax, 5
jb 0x40b40b
mov ecx, dword [ebp - 4]
cmp eax, 5
jae 0x40b496
mov edx, eax
cmp byte [edx + ecx], 0x90
jne 0x40b476
inc edx
mov eax, edx
cmp edx, 5
jb 0x40b468
mov dword [ebp - 0xc], eax
cmp eax, 5
jae 0x40b496
cmp dword [0x40f488], 0
mov esi, dword [ebp - 8]
push 9
pop edi
jne 0x40b534
jmp 0x40b52e
mov edx, dword [ebp - 0x10]
lea esi, [ebx + 0x1e]
cmp edx, esi
jbe 0x40b4a1
int3
push eax
mov byte [ebx + 0x36], al
sub dl, bl
push ecx
lea eax, [ebx + 0x20]
mov byte [esi], dl
push eax
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp - 0xc]
add esp, 0xc
cmp esi, 0x19
jbe 0x40b4c5
push 6
jmp 0x40b3f2
movzx ecx, byte [ebx + 0x1e]
mov edx, dword [ebp - 4]
add ecx, ebx
mov eax, dword [ebp - 0x24]
add edx, esi
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x40], edx
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
lea eax, [ebx + 0x1e]
mov dword [ecx + 1], edx
add ecx, 5
sub eax, ecx
mov edx, edi
cmp dword [ebp - 0x28], ecx
sbb esi, esi
not esi
and esi, eax
mov dword [ebp - 0x28], esi
mov esi, dword [ebp - 0xc]
jbe 0x40b50b
mov eax, dword [ebp - 0x28]
mov byte [ecx], 0xcc
inc ecx
inc edx
cmp edx, eax
jb 0x40b502
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], edi
push eax
push 0x40
push esi
mov esi, dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40b556
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov esi, dword [ebp - 8]
mov dword [0x40f4a8], edi
test ebx, ebx
je 0x40b53f
mov ecx, ebx
call fcn.0040ad8d
test esi, esi
je 0x40b54a
mov ecx, esi
call fcn.00403541
mov eax, dword [ebp - 0x18]
mov dword [0x40f498], eax
mov eax, edi
jmp 0x40b57d
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
mov dword [ecx + 8], eax
mov dword [ecx + 4], edi
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0xc], esi
mov eax, dword [ebp - 0x1c]
mov dword [ecx + 0x14], eax
mov eax, dword [0x40f484]
mov dword [ecx], eax
xor eax, eax
mov dword [0x40f484], ecx
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0xc