Function at 0x5a12ac
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
push edi
test dl, dl
je 0x5a12c1
add esp, 0xfffffff0
call fcn.00404458
mov dword [ebp - 0xc], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
lea esi, [ebp - 0x64]
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 8], edx
xor ecx, ecx
push ebp
push 0x5a163b
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov dl, 1
mov eax, dword [0x41afe8]
call fcn.004040b0
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call fcn.0041fe08
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
push 4
push 0x1000
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x50]
push eax
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x54]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
call fcn.00408544
mov eax, dword [ebp - 0x18]
add eax, 4
add eax, 0x14
mov edx, dword [ebp - 0x1c]
movzx edx, word [edx + 0x14]
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
movzx eax, word [eax + 6]
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x24]
dec ebx
test ebx, ebx
jb 0x5a13d2
inc ebx
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x28]
shl eax, 3
lea eax, [eax + eax*4]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax + 8]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0xc]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov edx, edi
mov eax, dword [ebp - 0x34]
call fcn.00408558
mov edx, dword [ebp - 0x30]
mov eax, edi
call fcn.005a12a4
mov ecx, eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 0x14]
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x34]
call fcn.00408544
inc dword [ebp - 0x28]
dec ebx
jne 0x5a137b
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
mov ecx, eax
sub ecx, dword [edx + 0x34]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0xa4]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0xa0]
add edx, eax
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
jmp 0x5a1455
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 4]
sub eax, 8
shr eax, 1
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x44]
add eax, 8
mov dword [ebp - 0x4c], eax
mov ebx, dword [ebp - 0x48]
dec ebx
test ebx, ebx
jb 0x5a144f
inc ebx
mov eax, dword [ebp - 0x4c]
mov ax, word [eax]
test ah, 0xf0
je 0x5a1443
mov edx, dword [ebp - 0x44]
mov edx, dword [edx]
add edx, dword [ebp - 0x20]
and ax, 0xfff
movzx eax, ax
add edx, eax
mov eax, dword [ebp - 0x38]
add dword [edx], eax
mov eax, dword [ebp - 0x4c]
add eax, 2
mov dword [ebp - 0x4c], eax
dec ebx
jne 0x5a1422
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
add eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x44]
ja 0x5a1402
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x80]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x58], eax
mov dl, 1
mov eax, dword [0x41a6fc]
call fcn.004040b0
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
jmp 0x5a153e
mov eax, dword [ebp - 0x58]
mov eax, dword [eax + 0xc]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
push eax
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x5a14b8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x60]
call fcn.0041cdf0
mov eax, dword [ebp - 0x58]
cmp dword [eax + 4], 0
jne 0x5a14ce
mov eax, dword [ebp - 0x58]
mov eax, dword [eax + 0x10]
add eax, dword [ebp - 0x20]
mov dword [esi], eax
jmp 0x5a152d
mov eax, dword [ebp - 0x58]
mov eax, dword [eax]
add eax, dword [ebp - 0x20]
mov dword [esi], eax
jmp 0x5a152d
test ebx, 0x80000000
je 0x5a14ed
and ebx, 0xffff
mov dword [ebp - 0x68], ebx
jmp 0x5a14f6
add ebx, dword [ebp - 0x20]
lea eax, [ebx + 2]
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x5a1515
mov eax, dword [esi]
mov edx, dword [ebp - 0x6c]
mov dword [eax], edx
jmp 0x5a1526
mov eax, dword [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x60]
push eax
call sub.KERNEL32.DLL_GetProcAddress
mov edx, dword [esi]
mov dword [edx], eax
mov eax, dword [esi]
add eax, 4
mov dword [esi], eax
mov eax, dword [esi]
mov ebx, dword [eax]
test ebx, ebx
jne 0x5a14da
mov eax, dword [ebp - 0x58]
add eax, 0x14
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
cmp dword [eax + 0xc], 0
jne 0x5a148c
mov ebx, dword [ebp - 0x24]
dec ebx
test ebx, ebx
jb 0x5a1601
inc ebx
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x28]
shl eax, 3
lea eax, [eax + eax*4]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x70]
mov eax, dword [eax + 0x24]
xor edx, edx
test eax, 0x4000000
je 0x5a1582
or eax, 0x200
test eax, 0x20000000
je 0x5a15b5
test eax, 0x40000000
je 0x5a15a1
test eax, 0x80000000
je 0x5a159c
or edx, 0x40
jmp 0x5a15dc
or edx, 0x20
jmp 0x5a15dc
test eax, 0x80000000
je 0x5a15b0
or edx, 0x80
jmp 0x5a15dc
or edx, 0x10
jmp 0x5a15dc
test eax, 0x40000000
je 0x5a15cd
test eax, 0x80000000
je 0x5a15c8
or edx, 4
jmp 0x5a15dc
or edx, 2
jmp 0x5a15dc
test eax, 0x80000000
je 0x5a15d9
or edx, 8
jmp 0x5a15dc
or edx, 1
lea eax, [ebp - 0x74]
push eax
push edx
mov eax, dword [ebp - 0x70]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x70]
mov eax, dword [eax + 0xc]
add eax, dword [ebp - 0x20]
push eax
call sub.KERNEL32.DLL_VirtualProtect
inc dword [ebp - 0x28]
dec ebx
jne 0x5a155f
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x78], eax
test eax, eax
je 0x5a161c
push 0
push 1
mov eax, dword [ebp - 0x20]
push eax
call dword [ebp - 0x78]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
mov dword [eax + 4], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5a1642
mov eax, dword [ebp - 0x10]
call fcn.004040e0
ret