Function at 0x521380
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a30fa
mov eax, dword fs:[0]
push eax
mov eax, 0x1078
call fcn.00535a10
mov eax, dword [0x60ef40]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 0xc], 0
jne 0x5213bc
xor eax, eax
jmp 0x5216b8
mov eax, dword [ebp + 0xc]
and eax, 1
je 0x52146d
push 0x1000
push 0
lea ecx, [ebp - 0x1010]
push ecx
call fcn.00537090
add esp, 0xc
mov dword [ebp - 0x102c], 0
lea edx, [ebp - 0x102c]
push edx
push 0x40
push 0x1000
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov dword [ebp - 0x1018], eax
cmp dword [ebp - 0x1018], 0
jne 0x521428
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, 0xc
jmp 0x5216b8
push 0
push 0x1000
lea eax, [ebp - 0x1010]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov dword [ebp - 0x1018], eax
cmp dword [ebp - 0x1018], 0
jne 0x521468
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, 9
jmp 0x5216b8
jmp 0x521577
mov edx, dword [ebp + 0xc]
and edx, 2
je 0x521577
push 0x5d4978
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x1024], eax
cmp dword [ebp - 0x1024], 0
jne 0x5214a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, 0x1b
jmp 0x5216b8
mov dword [ebp - 0x101c], 0
lea edx, [ebp - 0x101c]
push edx
push 0x40
push 0x1000
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
jne 0x5214f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, 0xc
jmp 0x5216b8
push 0
push 0x1000
mov eax, dword [ebp - 0x1024]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
jne 0x521532
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, 9
jmp 0x5216b8
lea edx, [ebp - 0x101c]
push edx
mov eax, dword [ebp - 0x101c]
push eax
push 0x1000
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
jne 0x521577
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, 0xc
jmp 0x5216b8
mov edx, dword [ebp + 0xc]
and edx, 4
je 0x5216b6
lea ecx, [ebp - 0x1050]
call fcn.00523820
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x1050]
call fcn.00523920
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x1050]
call fcn.00523d00
mov dword [ebp - 0x1028], eax
cmp dword [ebp - 0x1028], 0
jne 0x5215e9
mov dword [ebp - 0x1030], 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1050]
call fcn.005238f0
mov eax, dword [ebp - 0x1030]
jmp 0x5216b8
mov dword [ebp - 0x1084], 0
push 0x30
push 0
lea edx, [ebp - 0x1080]
push edx
call fcn.00537090
add esp, 0xc
push 0
push 0x34
lea eax, [ebp - 0x1084]
push eax
mov ecx, dword [ebp - 0x1028]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x52164a
mov dword [ebp - 0x1034], 0xb
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1050]
call fcn.005238f0
mov eax, dword [ebp - 0x1034]
jmp 0x5216b8
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1020]
call fcn.00521760
mov ecx, dword [ebp - 0x1070]
push ecx
mov edx, dword [ebp - 0x1074]
push edx
lea ecx, [ebp - 0x1020]
call fcn.005216e0
mov eax, dword [ebp - 0x1080]
push eax
mov ecx, dword [ebp - 0x1084]
push ecx
lea ecx, [ebp - 0x1020]
call fcn.005216e0
mov edx, dword [ebp - 0x1078]
push edx
mov eax, dword [ebp - 0x107c]
push eax
lea ecx, [ebp - 0x1020]
call fcn.005216e0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1050]
call fcn.005238f0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00534c20
mov esp, ebp
pop ebp
ret