Function at 0x521f00
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x60ef40]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x210
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.00537090
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 0x104
lea edx, [ebp - 0x21c]
push edx
call fcn.00521840
mov dword [ebp - 0x230], 0
mov eax, dword [0x5d4c94]
mov dword [ebp - 0x14], eax
mov ecx, dword [0x5d4c98]
mov dword [ebp - 0x10], ecx
mov edx, dword [0x5d4c9c]
mov dword [ebp - 0xc], edx
mov ax, word [0x5d4ca0]
mov word [ebp - 8], ax
mov cl, byte [0x5d4ca2]
mov byte [ebp - 6], cl
lea edx, [ebp - 0x230]
push edx
lea eax, [ebp - 0x14]
push eax
push 0x5d4ca4
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0051fd10
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x521fad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, 7
jmp 0x52214a
mov edx, dword [ebp - 0x230]
mov dword [ebp - 0x220], edx
mov eax, 0x5221b0
sub eax, 0x522160
mov dword [ebp - 0x234], eax
push 0x40
push 0x3000
mov ecx, dword [ebp - 0x234]
add ecx, 0x220
push ecx
push 0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jne 0x52200d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, 3
jmp 0x52214a
push 0
push 0x210
lea edx, [ebp - 0x224]
push edx
mov eax, dword [ebp - 0x22c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x52205d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x1c]
mov dword [edx], eax
push 0x8000
push 0
mov eax, dword [ebp - 0x22c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, 9
jmp 0x52214a
mov edx, dword [ebp - 0x22c]
add edx, 0x21f
and edx, 0xfffffff0
mov dword [ebp - 0x238], edx
push 0
mov eax, dword [ebp - 0x234]
push eax
push 0x522160
mov ecx, dword [ebp - 0x238]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x5220c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
push 0x8000
push 0
mov edx, dword [ebp - 0x22c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, 9
jmp 0x52214a
mov dword [ebp - 0x23c], 0
mov ecx, dword [ebp + 0x14]
and ecx, 0x20
je 0x5220dd
mov byte [ebp - 0x225], 1
jmp 0x5220e4
mov byte [ebp - 0x225], 0
lea edx, [ebp - 0x23c]
push edx
mov eax, dword [ebp + 0x1c]
push eax
movzx ecx, byte [ebp - 0x225]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x22c]
push eax
mov ecx, dword [ebp - 0x238]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.005241c0
add esp, 0x1c
mov dword [ebp - 0x240], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x23c]
mov dword [eax], ecx
cmp dword [ebp + 0x10], 3
je 0x522144
push 0x8000
push 0
mov edx, dword [ebp - 0x22c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, dword [ebp - 0x240]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534c20
mov esp, ebp
pop ebp
ret