Function at 0x405890
Capabilities:
Allocate or change rwx memory

Disassembly:
sub esp, 0x24
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x20], eax
xor eax, eax
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
mov ebp, dword [esp + 0x34]
mov dword [ebp + 4], eax
push edi
mov dword [ebp], eax
mov edi, edx
mov dword [esp + 0x18], edi
mov dword [ebx], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 4], eax
mov dword [ebx + 0x10], 0xa
mov dword [ebx + 8], eax
add edi, 0x14
add dword [ebp + 4], 0x14
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x20], 0
mov dword [esp + 0x21], eax
mov dword [esp + 0x25], eax
mov byte [esp + 0x29], al
mov dl, byte [ecx]
inc dword [ebp]
mov byte [esp + eax + 0x20], dl
inc eax
inc ecx
cmp eax, 9
jb 0x4058e5
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], str._PROGRAM_
call dword [sym.imp.MSVCR90.dll__strupr]
add esp, 4
nop
mov cl, byte [eax]
mov edx, dword [esp + 0x10]
cmp cl, byte [edx]
jne 0x405938
test cl, cl
je 0x405934
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x405938
add edx, 2
add eax, 2
mov dword [esp + 0x10], edx
test cl, cl
jne 0x405910
xor eax, eax
jmp 0x40593d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x405ad9
mov ecx, dword [esp + 0xc]
mov al, byte [ecx]
cmp al, 0xd
je 0x405957
cmp al, 0xa
je 0x405957
cmp al, 0x20
jne 0x405960
inc dword [esp + 0xc]
inc dword [ebp]
jmp 0x405945
mov ecx, dword [esp + 0xc]
push esi
call fcn.004056f0
add dword [ebp], eax
mov edx, dword [esi + 8]
add dword [ebx + 8], edx
add dword [esp + 0x10], eax
mov ecx, dword [0x426a2c]
mov edx, dword [esi + 0x10]
add esp, 4
mov eax, 0x426a2c
mov dword [esp + 0x10], 0
cmp ecx, 0x7fffffff
je 0x4059b1
cmp edx, ecx
jne 0x4059a3
mov ecx, dword [eax + 4]
mov dword [esp + 0x10], ecx
mov ecx, dword [eax + 8]
add eax, 8
cmp ecx, 0x7fffffff
jne 0x405998
mov eax, dword [esp + 0x10]
mov dword [esi + 0x10], eax
test edx, edx
jne 0x4059dd
mov ecx, dword [esi]
mov dword [edi], ecx
mov edx, dword [esi + 4]
mov dword [edi + 4], edx
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
mov ecx, dword [esi + 0xc]
mov dword [edi + 0xc], ecx
mov edx, dword [esi + 0x10]
mov dword [edi + 0x10], edx
jmp 0x405aa5
cmp edx, 1
jne 0x405aac
shr dword [esi + 8], 1
mov eax, dword [esi]
mov dword [edi], eax
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov edx, dword [esi + 8]
mov dword [edi + 8], edx
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
mov ecx, dword [esi + 0x10]
push 0x40
push 0x1000
mov dword [edi + 0x10], ecx
add dword [ebp + 4], 0x14
mov edx, dword [0x438028]
push 2
push 0
push edx
add edi, 0x14
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
je 0x405a6c
mov ecx, dword [0x438028]
lea eax, [esp + 0x14]
push eax
push 2
push 0x40d794
push ebx
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x405a6e
cmp dword [esp + 0x14], 2
je 0x405a6e
mov edx, dword [0x438028]
push 0x4000
push 2
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor ebx, ebx
mov dword [esi], ebx
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 0x10], 9
mov eax, ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi], eax
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov edx, dword [esi + 8]
mov dword [edi + 8], edx
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
mov ecx, dword [esi + 0x10]
mov dword [edi + 0x10], ecx
add edi, 0x14
add dword [ebp + 4], 0x14
mov edx, dword [esp + 0xc]
cmp byte [edx], 0x5b
jne 0x405960
mov ecx, dword [ebx]
mov eax, dword [esp + 0x18]
mov dword [eax], ecx
mov edx, dword [ebx + 4]
mov dword [eax + 4], edx
mov ecx, dword [ebx + 8]
mov dword [eax + 8], ecx
mov edx, dword [ebx + 0xc]
mov dword [eax + 0xc], edx
mov ecx, dword [ebx + 0x10]
mov dword [eax + 0x10], ecx
mov ecx, dword [esp + 0x2c]
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.004098be
add esp, 0x24
ret