Function at 0x41316c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
lea eax, [ebp - 0x40]
mov edx, dword [0x40e80c]
call fcn.00406430
xor eax, eax
push ebp
push 0x4133f2
push dword fs:[eax]
mov dword fs:[eax], esp
movzx eax, byte [0x4246f0]
mov byte [ebp - 0x41], al
cmp byte [ebp - 0x41], 0
jne 0x4133d6
xor edx, edx
mov eax, dword [0x42462c]
call fcn.004113f0
mov dword [0x429e84], eax
cmp dword [0x429e84], 0
je 0x4133d6
xor edx, edx
mov eax, dword [0x42460c]
call fcn.004112e4
lea edx, [ebp - 0x40]
call fcn.00411198
cmp byte [ebp - 0x40], 0
jne 0x4131f1
xor edx, edx
mov eax, dword [0x424608]
call fcn.004112e4
lea edx, [ebp - 0x40]
call fcn.00411198
mov eax, dword [ebp - 0x20]
call fcn.00406a2c
test eax, eax
jl 0x4133d6
inc eax
xor ebx, ebx
mov esi, ebx
add esi, esi
add esi, esi
add esi, esi
sub esi, ebx
mov edx, dword [ebp - 0x20]
cmp dword [edx + esi*4 + 0x14], 0
jne 0x413226
mov edx, dword [ebp - 0x20]
cmp dword [edx + esi*4 + 0x18], 0
je 0x4133ce
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + esi*4 + 0xc]
cmp edx, dword [0x429e84]
jne 0x4133ce
mov eax, dword [ebp - 0x20]
cmp byte [eax + esi*4 + 0x10], 0
je 0x4132b6
mov eax, dword [ebp - 0x20]
mov edi, dword [eax + esi*4 + 0xc]
mov eax, dword [ebp - 0x20]
sub edi, dword [eax + esi*4 + 0x14]
sub edi, 4
lea eax, [ebp - 0x48]
push eax
push 0x40
push 4
mov eax, ebx
add eax, eax
add eax, eax
add eax, eax
sub eax, ebx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + eax*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4133a8
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
mov dword [0x4246e0], eax
mov eax, dword [0x4246e0]
mov eax, dword [eax]
mov dword [0x4246e4], eax
mov eax, dword [0x4246e0]
mov dword [eax], edi
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x48]
push eax
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
jmp 0x4133a8
mov eax, dword [ebp - 0x20]
cmp dword [eax + esi*4 + 0x18], 0
je 0x413347
push 0
push 4
call fcn.004127f8
mov dword [0x4246dc], eax
mov eax, dword [0x4246dc]
mov dword [eax], 0x413128
lea eax, [ebp - 0x48]
push eax
push 0x40
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x18]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x413332
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x18]
mov dword [0x4246e8], eax
mov eax, dword [0x4246e8]
mov eax, dword [eax]
mov dword [0x4246ec], eax
mov eax, dword [0x4246e8]
mov edx, dword [0x4246dc]
mov dword [eax], edx
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x48]
push eax
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x18]
push eax
call sub.kernel32.dll_VirtualProtect
lea eax, [ebp - 0x48]
push eax
push 0x20
push 4
mov eax, dword [0x4246dc]
push eax
call sub.kernel32.dll_VirtualProtect
jmp 0x4133a8
lea eax, [ebp - 0x48]
push eax
push 0x40
push 4
mov eax, ebx
add eax, eax
add eax, eax
add eax, eax
sub eax, ebx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + eax*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4133a8
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
mov dword [0x4246e8], eax
mov eax, dword [0x4246e8]
mov eax, dword [eax]
mov dword [0x4246ec], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0xc]
mov edx, dword [0x4246e8]
mov dword [edx], eax
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x48]
push eax
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
cmp dword [0x4246e8], 0
jne 0x4133be
cmp dword [0x4246e0], 0
jne 0x4133be
xor eax, eax
jmp 0x4133c0
mov al, 1
mov byte [ebp - 0x41], al
movzx eax, byte [ebp - 0x41]
mov byte [0x4246f0], al
jmp 0x4133d6
inc ebx
dec eax
jne 0x413204
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4133f9
lea eax, [ebp - 0x40]
mov edx, dword [0x40e80c]
call fcn.004064fc
ret