Function at 0x399a10
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
push esi
push edi
mov byte [ebp - 5], 0
mov eax, dword [ebp + 8]
push eax
push 0x2bb
call fcn.0039f1c0
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x399c6f
cmp dword [0x455c4c], 0
jne 0x399a54
push 1
push 0x42db98
call fcn.003a3460
mov dword [0x455c4c], eax
cmp dword [0x455c50], 0
jne 0x399a6e
push 1
push 0x42db80
call fcn.003a3460
mov dword [0x455c50], eax
mov byte [ebp - 0x250], 0xb8
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x24f], ecx
mov byte [ebp - 0x24b], 0xb9
mov edx, dword [ebp - 4]
add edx, 0x235
mov dword [ebp - 0x24a], edx
mov eax, 0xd1ff
mov word [ebp - 0x246], ax
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
sub esp, 0xf8
mov ecx, 0x3e
lea esi, [ebp + 0x14]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00399c80
add esp, 0xfc
mov dword [ebp - 0x23c], eax
mov edx, dword [ebp + 0xc]
push edx
call fcn.003b84db
add esp, 4
movzx eax, ax
shl eax, 1
mov word [ebp - 0x233], ax
movzx ecx, word [ebp - 0x233]
add ecx, 2
mov word [ebp - 0x231], cx
mov edx, dword [ebp - 4]
add edx, 0x25
mov dword [ebp - 0x22f], edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x22b]
push ecx
call fcn.003b8781
add esp, 8
mov edx, dword [0x455c4c]
mov dword [ebp - 0x23], edx
mov eax, dword [0x455c50]
mov dword [ebp - 0x1f], eax
cmp dword [ebp - 0x23c], 0
je 0x399c6f
lea ecx, [ebp - 0x14]
push ecx
push 0x236
lea edx, [ebp - 0x250]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x399c6f
cmp dword [ebp - 0x14], 0x236
jne 0x399c6f
lea edx, [ebp - 0x14]
push edx
push 0x85
push 0x42dbe8
mov eax, dword [ebp - 4]
add eax, 0x235
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x399c6f
cmp dword [ebp - 0x14], 0x85
jne 0x399c6f
lea edx, [ebp - 0x14]
push edx
push 5
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x23c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x399c6f
cmp dword [ebp - 0x14], 5
jne 0x399c6f
lea eax, [ebp - 0x14]
push eax
push 5
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x18
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x399c6f
cmp dword [ebp - 0x14], 5
jne 0x399c6f
lea ecx, [ebp - 0x254]
push ecx
push 0x40
push 5
mov edx, dword [ebp - 0x23c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x399c6f
mov byte [ebp - 0x10], 0xe9
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 0x23c]
sub ecx, 5
mov dword [ebp - 0xf], ecx
lea edx, [ebp - 0x14]
push edx
push 5
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x23c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x254]
push eax
mov ecx, dword [ebp - 0x254]
push ecx
push 5
mov edx, dword [ebp - 0x23c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov byte [ebp - 5], 1
mov al, byte [ebp - 5]
pop edi
pop esi
mov esp, ebp
pop ebp
ret