Function at 0x5021ac
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x18], 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 0x502578
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 2
jge 0x502245
inc dword [ebp - 0x44]
lea eax, [ebp - 0x40]
push eax
push 0x53392c
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x28]
call fcn.004fb5ec
lea ecx, [ebp - 0x28]
mov edx, 0x533894
mov eax, 0x5338ac
call fcn.004f8844
xor eax, eax
mov dword [ebp - 0x34], eax
mov eax, dword [0x5338a4]
add eax, dword [0x5339d8]
cmp eax, dword [0x5339d8]
jne 0x502236
mov eax, dword [0x533a18]
mov dword [0x53386c], eax
inc dword [ebp - 0x34]
cmp dword [ebp - 0x34], 7
jne 0x502219
cmp dword [ebp - 0x44], 2
jl 0x5021e8
mov eax, dword [0x5339ac]
call fcn.004071f4
mov dword [0x5339ac], eax
mov eax, dword [0x53386c]
cmp eax, dword [0x5339ac]
jge 0x5022a0
xor eax, eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 7
jge 0x502288
inc dword [ebp - 0x28]
imul eax, dword [ebp - 0x2c], 0xb9
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x48]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x28], 7
jl 0x50226c
mov eax, 0xbb
sub eax, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
mov eax, dword [0x533874]
add eax, 0x19
mov dword [0x533974], eax
lea eax, [ebp - 0x18]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.0040abd8
mov eax, dword [0x5339f8]
mov edx, eax
shl eax, 4
add eax, edx
mov dword [0x5338f4], eax
mov eax, dword [0x533894]
mov dword [0x533944], eax
mov eax, dword [0x533964]
sub eax, dword [0x533944]
cmp eax, 0x4a
jge 0x50231c
mov eax, dword [0x5339d8]
mov dword [0x5339d0], eax
mov eax, dword [0x5339d0]
cmp eax, dword [0x533944]
jge 0x50231c
mov ecx, 1
mov edx, dword [0x533a20]
mov eax, 0x502594
call fcn.0040ade8
cmp eax, 3
je 0x50231c
mov eax, dword [0x533a18]
mov dword [0x5338cc], eax
lea eax, [ebp - 0x4c]
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 0x502550
mov eax, dword [ebp - 0x28]
add eax, 0x5e
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
call fcn.0040762c
mov dword [ebp - 0x38], eax
mov eax, dword [0x5339f8]
call fcn.004071f4
mov dword [0x5339f8], eax
mov eax, dword [0x5339d0]
mov dword [0x533a18], eax
mov eax, dword [0x5339f8]
cmp eax, dword [0x533a18]
jge 0x502392
mov ecx, dword [ebp - 0x38]
mov edx, dword [0x5338ac]
mov eax, dword [ebp - 0x34]
call fcn.004fa8d8
mov dword [0x5339e8], eax
jmp 0x5023c0
mov eax, dword [ebp - 0x20]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
mov eax, dword [0x53395c]
sub eax, 0x42
mov dword [0x53396c], eax
mov eax, dword [0x5339d8]
call fcn.004071f4
mov dword [0x5339d8], eax
mov eax, dword [0x533a38]
add eax, 4
mov dword [0x53390c], eax
mov eax, dword [0x5338c4]
mov dword [0x533964], eax
mov eax, dword [0x5339bc]
add eax, 0x99
mov dword [0x533864], eax
mov eax, dword [0x5339e8]
sub eax, dword [0x5339ac]
mov dword [0x533964], eax
mov edx, dword [ebp - 4]
lea eax, [ebp - 9]
mov ecx, 5
call fcn.00406fb0
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
sub edx, dword [ebp - 0x2c]
cmp eax, edx
jle 0x502443
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
call fcn.0040aba0
jne 0x50242f
mov eax, dword [0x533a40]
mov dword [0x5338ac], eax
jmp 0x502443
mov eax, dword [ebp - 0x24]
add eax, 4
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
call fcn.00407638
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x48]
sub eax, 0xa8
mov dword [ebp - 0x1c], eax
mov eax, dword [0x533a50]
mov dword [0x5338d4], eax
fild dword [ebp - 0x30]
call fcn.00407638
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x40]
sub eax, 0x8d
mov dword [ebp - 0x3c], eax
mov eax, dword [0x5338f4]
add eax, 0x3a
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
call fcn.0040762c
mov dword [0x5338e4], eax
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 0x4c]
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
imul eax, dword [ebp - 0x2c], 0x2e
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
mov eax, dword [0x533a08]
mov dword [0x533a28], eax
mov eax, dword [0x53394c]
mov dword [0x533a40], eax
mov eax, dword [0x533a28]
cmp eax, dword [0x533a40]
jle 0x5024e4
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x28]
mov edx, 0x5338c4
lea eax, [ebp - 0x2c]
call fcn.004f8a20
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x40]
add eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x38]
jle 0x502529
mov ecx, 1
mov edx, dword [ebp - 0x18]
mov eax, 0x5025c8
call fcn.0040ade8
cmp eax, 0x16
jge 0x502541
mov eax, dword [0x53388c]
add eax, 4
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
call fcn.00407638
mov dword [0x533a18], eax
jmp 0x502541
mov eax, dword [0x5338ec]
add eax, 4
mov dword [ebp - 0x58], eax
fild dword [ebp - 0x58]
call fcn.00407638
mov dword [0x5339d0], eax
mov eax, dword [0x533874]
call fcn.004071f4
mov dword [0x533874], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50257f
lea eax, [ebp - 0x54]
mov edx, 2
call fcn.00409c54
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00409c54
ret