Function at 0x502bd4
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff9c
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x60], ecx
mov esi, edx
lea edi, [ebp - 9]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x502e4b
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x58]
push eax
push 0x40
push 5
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_VirtualProtect
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xa], al
cmp byte [ebp - 0xa], 0
je 0x502e28
mov eax, dword [0x53588c]
mov dword [0x53597c], eax
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [0x5359bc]
add eax, dword [0x53597c]
mov edx, dword [0x5359c4]
add edx, dword [0x5359bc]
cmp eax, edx
jge 0x502c6b
xor eax, eax
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 1
jge 0x502c6b
inc dword [ebp - 0x4c]
mov eax, dword [0x53596c]
mov dword [0x53587c], eax
cmp dword [ebp - 0x4c], 1
jl 0x502c58
inc dword [ebp - 0x40]
cmp dword [ebp - 0x40], 0x10
jne 0x502c32
fild dword [ebp - 0x14]
call fcn.0040762c
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x30]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x48], eax
mov eax, dword [0x535a00]
sub eax, dword [0x535864]
cmp eax, dword [0x535a00]
jge 0x502cd5
xor eax, eax
mov dword [ebp - 0x50], eax
mov eax, dword [0x5359e8]
mov dword [0x535a48], eax
mov eax, dword [0x53587c]
cmp eax, dword [0x535a48]
jle 0x502cca
lea eax, [ebp - 0x10]
push eax
xor ecx, ecx
mov edx, 1
mov eax, dword [ebp - 0x10]
call fcn.0040abd8
inc dword [ebp - 0x50]
cmp dword [ebp - 0x50], 3
jne 0x502ca0
jmp 0x502cde
mov eax, dword [ebp - 0x3c]
imul dword [ebp - 0x18]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x535964]
mov dword [0x535964], eax
mov edx, dword [ebp - 4]
lea eax, [ebp - 9]
mov ecx, 5
call fcn.00406fb0
mov ecx, 1
mov edx, dword [0x535a20]
mov eax, 0x502e68
call fcn.0040ade8
cmp eax, 0x27
je 0x502d1c
mov eax, dword [0x535a00]
mov dword [0x535874], eax
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x5358b4]
call fcn.004071f4
mov dword [0x5358b4], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x30]
cmp eax, 0x9a
jge 0x502d4c
mov eax, dword [ebp - 0x18]
sub eax, 0xb6
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
imul eax, dword [ebp - 0x2c], 0xee
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x58]
push eax
mov eax, dword [ebp - 0x58]
push eax
push 5
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_VirtualProtect
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xa], al
xor eax, eax
mov dword [ebp - 0x50], eax
mov eax, dword [0x5359c4]
mov dword [0x53585c], eax
mov eax, dword [ebp - 0x3c]
sub eax, 0x76
mov dword [ebp - 0x14], eax
imul eax, dword [ebp - 0x54], 0x89
mov dword [ebp - 0x1c], eax
imul eax, dword [ebp - 0x38], 0xb9
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 2
jge 0x502dcf
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x20], 2
jl 0x502db2
jmp 0x502dcf
imul eax, dword [0x5358cc], 0x1a
mov dword [0x53585c], eax
mov edx, dword [0x53585c]
mov eax, dword [ebp - 0x24]
call fcn.004f8ad0
mov dword [0x5358a4], eax
mov eax, dword [0x5359d0]
sub eax, 0xb1
mov dword [0x5358d4], eax
mov eax, dword [0x535904]
mov dword [0x5358ec], eax
mov eax, dword [0x53585c]
cmp eax, dword [0x5358ec]
jle 0x502e1e
mov eax, dword [0x535874]
mov dword [0x53590c], eax
mov eax, dword [0x5359c4]
mov dword [0x53593c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x502e52
lea eax, [ebp - 0x60]
mov edx, 2
call fcn.00409c54
lea eax, [ebp - 0x10]
call fcn.00409bf4
ret