Function at 0x404317
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x44c074]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
mov dword [ebp - 0x30], ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x44deac], eax
je 0x404348
mov eax, 0x10dd
jmp 0x404585
mov eax, dword [0x44deb0]
test eax, eax
jne 0x404585
test ebx, ebx
jne 0x404361
push 6
pop eax
jmp 0x404585
mov ecx, dword [ebx]
test ecx, ecx
jne 0x40437a
push 6
pop eax
mov dword [0x44deb0], eax
mov dword [0x44dea4], ebx
jmp 0x404585
push edi
mov ebx, esi
mov edi, esi
call fcn.00403e66
mov ecx, 0x403860
mov dword [ebp - 0x10], eax
call fcn.00403e66
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0x10]
jne 0x4043aa
cmp dword [0x44de94], ebx
jne 0x40457a
jmp 0x40455b
push 0x18
call fcn.0041ac5c
mov edi, eax
mov dword [ebp - 0x2c], edi
pop ecx
test edi, edi
jne 0x4043c3
push 8
pop esi
jmp 0x40455b
mov ecx, dword [ebp - 0x10]
call fcn.00403cff
mov ebx, eax
test ebx, ebx
je 0x4043bb
mov edi, dword [ebp - 0x10]
lea edx, [ebx + 0x1e]
mov dword [ebx + 0x38], esi
mov ecx, edi
mov dword [ebx + 0x3c], esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x1c], esi
jmp 0x4043ed
mov ecx, dword [ebp - 0x28]
lea edx, [ebp - 0xc]
mov dword [ebp - 0x24], ecx
push edx
push ecx
push ecx
mov ecx, eax
mov dword [ebp - 0xc], esi
call fcn.004046bd
mov edx, dword [ebp - 0x18]
mov ecx, eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x24]
add eax, ecx
mov dword [ebp - 0x28], ecx
add edx, eax
sub ecx, edi
mov dword [ebp - 0x18], edx
mov al, cl
sub dl, bl
mov dword [ebp - 0x14], ecx
and al, 7
shl dl, 3
or dl, al
mov eax, dword [ebp - 0x1c]
mov byte [ebx + eax + 0x38], dl
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, 8
jae 0x40444c
mov ecx, dword [ebp - 0x24]
call fcn.00403901
mov ecx, dword [ebp - 0x14]
test eax, eax
jne 0x40444c
mov eax, dword [ebp - 0x18]
cmp ecx, 5
jb 0x4043ea
mov edi, dword [ebp - 0x2c]
cmp ecx, 5
jae 0x404487
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x28]
mov ecx, edi
call fcn.0040395a
test eax, eax
je 0x404475
add edi, eax
mov ecx, edi
sub ecx, esi
mov dword [ebp - 0x14], ecx
cmp ecx, 5
jb 0x40445a
jmp 0x404478
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x2c]
push 0
pop esi
cmp ecx, 5
jb 0x40454f
cmp dword [ebp - 0x1c], 8
ja 0x40454f
mov eax, dword [ebp - 0x18]
lea edx, [ebx + 0x1e]
cmp eax, edx
jbe 0x40449c
int3
sub al, bl
mov byte [ebx + 0x36], cl
push ecx
push dword [ebp - 0x10]
mov byte [edx], al
lea eax, [ebx + 0x20]
push eax
call fcn.0041da90
mov eax, dword [ebp - 0x14]
add esp, 0xc
cmp eax, 0x19
jbe 0x4044c2
push 6
jmp 0x4043bd
movzx ecx, byte [ebx + 0x1e]
mov edx, dword [ebp - 0x10]
add ecx, ebx
add edx, eax
mov eax, dword [ebp - 0x20]
and dword [ebp - 0x20], 0
mov dword [ebx + 0x40], edx
mov dword [ebx + 0x44], eax
lea eax, [ecx + 5]
sub edx, eax
mov byte [ecx], 0xe9
mov dword [ecx + 1], edx
mov eax, esi
add ecx, 5
lea edx, [ebx + 0x1e]
sub edx, ecx
cmp ecx, dword [ebp - 0x34]
cmova edx, dword [ebp - 0x20]
test edx, edx
je 0x404503
mov byte [ecx], 0xcc
inc ecx
inc eax
cmp eax, edx
jb 0x4044fa
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
push eax
push 0x40
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x404526
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x40455b
mov eax, dword [ebp - 0x30]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0xc], eax
mov dword [edi + 4], esi
mov dword [edi + 0x10], ebx
mov eax, dword [ebp - 8]
mov dword [edi + 0x14], eax
mov eax, dword [0x44de90]
mov dword [edi], eax
xor eax, eax
mov dword [0x44de90], edi
jmp 0x404584
cmp dword [0x44de94], 0
push 9
pop esi
jne 0x404561
mov dword [0x44deb0], esi
test ebx, ebx
je 0x40456c
mov ecx, ebx
call fcn.00403e41
test edi, edi
je 0x40457a
push 0x18
push edi
call fcn.0041ac94
pop ecx
pop ecx
mov eax, dword [ebp - 0x30]
mov dword [0x44dea4], eax
mov eax, esi
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ac4b
mov esp, ebp
pop ebp
ret 0xc