Function at 0x501714
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff8c
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x74], 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 0x501ad7
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x6c]
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 0x501aaf
xor eax, eax
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 2
jge 0x5017d8
inc dword [ebp - 0x5c]
xor eax, eax
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x10]
call fcn.0040a01c
xor eax, eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xc
jge 0x5017a2
inc dword [ebp - 0x1c]
imul eax, dword [ebp - 0x58], 0xf0
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x1c], 0xc
jl 0x50178f
inc dword [ebp - 0x64]
cmp dword [ebp - 0x64], 8
jne 0x501779
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [0x53497c]
call fcn.004071f4
mov dword [0x53497c], eax
inc dword [ebp - 0x40]
cmp dword [ebp - 0x40], 7
jne 0x5017b0
imul eax, dword [ebp - 0x38], 0x85
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x5c], 2
jl 0x501771
mov eax, dword [0x534964]
mov dword [0x534a08], eax
mov eax, dword [0x534a08]
cmp eax, dword [0x53497c]
jge 0x501873
mov eax, dword [0x5349bc]
mov dword [0x53485c], eax
mov eax, dword [0x534a08]
cmp eax, dword [0x53485c]
jle 0x50183d
mov eax, dword [ebp - 0x48]
sub eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x28]
jge 0x501827
mov eax, dword [ebp - 0x4c]
sub eax, dword [ebp - 0x3c]
mov dword [ebp - 0x68], eax
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x44], eax
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 4
jne 0x50182c
jmp 0x501848
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x10]
call fcn.0040a01c
imul eax, dword [0x5348f4], 0xa7
mov dword [0x5348f4], eax
mov eax, 0xd8
sub eax, dword [0x53485c]
mov dword [0x53497c], eax
mov eax, dword [0x534a00]
mov dword [0x53498c], eax
jmp 0x5018d7
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x24]
jle 0x5018ae
xor eax, eax
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 4
jge 0x50189c
inc dword [ebp - 0x54]
lea eax, [ebp - 0x10]
mov edx, 0x501af4
call fcn.0040a01c
cmp dword [ebp - 0x54], 4
jl 0x501886
mov eax, dword [0x53496c]
sub eax, dword [0x534a08]
mov dword [0x53490c], eax
jmp 0x5018be
mov eax, dword [0x5349bc]
imul dword [0x534984]
mov dword [0x5349e0], eax
mov eax, dword [0x534a08]
mov dword [0x534a38], eax
mov eax, dword [0x534a00]
sub eax, 0xfc
mov dword [0x53488c], eax
imul eax, dword [0x534894], 0xf8
mov dword [0x53492c], eax
mov eax, dword [0x534964]
call fcn.004071f4
mov dword [0x534964], eax
mov eax, dword [0x534a08]
cmp eax, dword [0x534964]
jge 0x501911
imul eax, dword [0x5349d0], 0x8e
mov dword [0x534a18], eax
mov edx, dword [ebp - 4]
lea eax, [ebp - 9]
mov ecx, 5
call fcn.00406fb0
mov eax, dword [ebp - 0x40]
sub eax, 0x21
mov dword [ebp - 0x3c], eax
call fcn.00500764
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
call fcn.0040aba0
jne 0x501947
mov eax, 0x56
sub eax, dword [ebp - 0x58]
mov dword [ebp - 0x4c], eax
mov eax, dword [0x5349d0]
call fcn.004071f4
mov dword [0x5349d0], eax
mov eax, dword [0x5349e8]
mov dword [0x5349e0], eax
mov eax, dword [0x5349e0]
cmp eax, dword [0x5349d0]
jge 0x5019d3
xor eax, eax
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 4
jge 0x50198b
inc dword [ebp - 0x60]
mov eax, dword [0x53497c]
mov dword [0x53485c], eax
cmp dword [ebp - 0x60], 4
jl 0x501978
mov eax, dword [0x534884]
add eax, dword [0x534a28]
cmp eax, dword [0x534a28]
jle 0x5019c8
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [0x534a48]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x4c]
mov edx, dword [0x5348cc]
mov eax, dword [0x53487c]
call fcn.004fd708
mov dword [ebp - 0x50], eax
jmp 0x5019d9
mov eax, dword [ebp - 0x48]
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
jmp 0x5019d9
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x5c], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xe
jge 0x501a01
inc dword [ebp - 0x2c]
mov eax, dword [0x53486c]
call fcn.004071f4
mov dword [0x53486c], eax
cmp dword [ebp - 0x2c], 0xe
jl 0x5019e9
inc dword [ebp - 0x5c]
cmp dword [ebp - 0x5c], 4
jne 0x5019de
xor eax, eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xd
jge 0x501a2a
inc dword [ebp - 0x30]
mov eax, dword [0x53488c]
mov dword [0x5348fc], eax
jmp 0x501a2a
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x6c]
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 - 0x64], eax
mov eax, dword [0x5349bc]
mov dword [0x53485c], eax
inc dword [ebp - 0x64]
cmp dword [ebp - 0x64], 1
jne 0x501a4b
mov eax, dword [ebp - 0x28]
add eax, 4
mov dword [ebp - 0x20], eax
imul eax, dword [ebp - 0x60], 0x6b
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 1
jge 0x501a88
inc dword [ebp - 0x40]
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x40], 1
jl 0x501a79
mov eax, dword [0x53489c]
mov dword [0x53493c], eax
xor eax, eax
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 3
jge 0x501aaf
inc dword [ebp - 0x68]
mov eax, dword [ebp - 0x30]
add eax, 4
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x68], 3
jl 0x501a9d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x501ade
lea eax, [ebp - 0x74]
mov edx, 2
call fcn.00409c54
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00409c54
ret