Function at 0x417b98
Capabilities:
Allocate or change rwx memory

Disassembly:
sub esp, 0x24
push ebx
mov ebx, ecx
mov dword [esp + 0x14], edx
push edi
mov dword [esp + 0x1c], ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x45f350], eax
je 0x417bc1
mov eax, 0x10dd
jmp 0x417de8
mov eax, dword [0x45f354]
test eax, eax
jne 0x417de8
test ebx, ebx
jne 0x417bda
push 6
pop eax
jmp 0x417de8
mov ecx, dword [ebx]
test ecx, ecx
jne 0x417bf3
push 6
pop eax
mov dword [0x45f354], eax
mov dword [0x45f33c], ebx
jmp 0x417de8
push ebp
push esi
mov ebx, edi
mov ebp, edi
call fcn.0041798a
mov ecx, dword [esp + 0x20]
mov esi, eax
mov dword [esp + 0x10], esi
call fcn.0041798a
mov dword [esp + 0x30], eax
cmp eax, esi
jne 0x417c26
cmp dword [0x45f358], ebx
jne 0x417db2
jmp 0x417d95
push 0x18
call dword [sym.imp.msvcrt.dll_malloc]
mov ebp, eax
mov dword [esp + 0x30], ebp
pop ecx
test ebp, ebp
jne 0x417c41
push 8
pop edi
jmp 0x417d95
mov ecx, esi
call fcn.00417790
mov ebx, eax
test ebx, ebx
je 0x417c39
mov edx, esi
mov dword [ebx + 0x38], edi
mov ecx, ebx
mov dword [ebx + 0x3c], edi
mov dword [esp + 0x14], ecx
mov ebp, edx
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], edi
push eax
push ecx
push edx
mov esi, edx
call fcn.00417df0
mov edx, dword [esp + 0x14]
mov ecx, eax
mov eax, dword [esp + 0x1c]
sub eax, esi
mov dword [esp + 0x20], ecx
add eax, ecx
sub ecx, ebp
add edx, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
and cl, 7
sub dl, bl
shl dl, 3
xor dl, cl
mov ecx, esi
mov byte [ebx + 0x38], dl
call fcn.004175da
mov edx, dword [esp + 0x20]
test eax, eax
mov eax, dword [esp + 0x18]
jne 0x417cb7
mov ecx, dword [esp + 0x14]
cmp eax, 5
jb 0x417c5e
mov ebp, dword [esp + 0x2c]
cmp eax, 5
jae 0x417cf1
mov ecx, dword [esp + 0x10]
cmp byte [edx], 0x90
jne 0x417cd3
inc edx
mov eax, edx
sub eax, ecx
cmp eax, 5
jb 0x417cc4
mov dword [esp + 0x18], eax
cmp eax, 5
jae 0x417cf1
cmp dword [0x45f358], 0
push 9
pop edi
jne 0x417d9b
jmp 0x417d95
mov ecx, dword [esp + 0x14]
lea edx, [ebx + 0x1e]
cmp ecx, edx
jbe 0x417cfd
int3
push eax
push dword [esp + 0x14]
mov byte [ebx + 0x36], al
sub cl, bl
lea eax, [ebx + 0x20]
mov byte [edx], cl
push eax
call sub.msvcrt.dll_memcpy
mov esi, dword [esp + 0x24]
add esp, 0xc
cmp esi, 0x19
jbe 0x417d25
push 6
jmp 0x417c3b
movzx ecx, byte [ebx + 0x1e]
mov eax, dword [esp + 0x30]
add ecx, ebx
mov edx, dword [esp + 0x10]
add edx, esi
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x40], edx
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
mov eax, edi
and dword [esp + 0x30], eax
mov dword [ecx + 1], edx
lea edx, [ebx + 0x1e]
add ecx, 5
mov dword [esp + 0x18], edx
sub dword [esp + 0x18], ecx
cmp ecx, edx
mov edx, dword [esp + 0x18]
cmova edx, dword [esp + 0x30]
test edx, edx
je 0x417d72
mov byte [ecx], 0xcc
inc ecx
inc eax
cmp eax, edx
jb 0x417d69
lea eax, [esp + 0x28]
mov dword [esp + 0x28], edi
push eax
push 0x40
push esi
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x417dbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [0x45f354], edi
test ebx, ebx
je 0x417da6
mov ecx, ebx
call fcn.004178fe
test ebp, ebp
je 0x417db2
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, dword [esp + 0x24]
mov dword [0x45f33c], eax
mov eax, edi
jmp 0x417de6
mov eax, dword [esp + 0x24]
mov dword [ebp + 8], eax
mov dword [ebp + 4], edi
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0xc], esi
mov eax, dword [esp + 0x28]
mov dword [ebp + 0x14], eax
mov eax, dword [0x45f348]
mov dword [ebp], eax
xor eax, eax
mov dword [0x45f348], ebp
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x24
ret 0xc