Function at 0x59d900
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
push edi
test dl, dl
je 0x59d915
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 0x59dc8f
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov dl, 1
mov eax, dword [0x41b0e0]
call fcn.004040b0
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call fcn.004200f0
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.0040853c
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 0x59da26
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.00408550
mov edx, dword [ebp - 0x30]
mov eax, edi
call fcn.0059d8f8
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.0040853c
inc dword [ebp - 0x28]
dec ebx
jne 0x59d9cf
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 0x59daa9
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 0x59daa3
inc ebx
mov eax, dword [ebp - 0x4c]
mov ax, word [eax]
test ah, 0xf0
je 0x59da97
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 0x59da76
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 0x59da56
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 [0x41a7f4]
call fcn.004040b0
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
jmp 0x59db92
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 0x59db0c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x60]
call fcn.0041cee8
mov eax, dword [ebp - 0x58]
cmp dword [eax + 4], 0
jne 0x59db22
mov eax, dword [ebp - 0x58]
mov eax, dword [eax + 0x10]
add eax, dword [ebp - 0x20]
mov dword [esi], eax
jmp 0x59db81
mov eax, dword [ebp - 0x58]
mov eax, dword [eax]
add eax, dword [ebp - 0x20]
mov dword [esi], eax
jmp 0x59db81
test ebx, 0x80000000
je 0x59db41
and ebx, 0xffff
mov dword [ebp - 0x68], ebx
jmp 0x59db4a
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 0x59db69
mov eax, dword [esi]
mov edx, dword [ebp - 0x6c]
mov dword [eax], edx
jmp 0x59db7a
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 0x59db2e
mov eax, dword [ebp - 0x58]
add eax, 0x14
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
cmp dword [eax + 0xc], 0
jne 0x59dae0
mov ebx, dword [ebp - 0x24]
dec ebx
test ebx, ebx
jb 0x59dc55
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 0x59dbd6
or eax, 0x200
test eax, 0x20000000
je 0x59dc09
test eax, 0x40000000
je 0x59dbf5
test eax, 0x80000000
je 0x59dbf0
or edx, 0x40
jmp 0x59dc30
or edx, 0x20
jmp 0x59dc30
test eax, 0x80000000
je 0x59dc04
or edx, 0x80
jmp 0x59dc30
or edx, 0x10
jmp 0x59dc30
test eax, 0x40000000
je 0x59dc21
test eax, 0x80000000
je 0x59dc1c
or edx, 4
jmp 0x59dc30
or edx, 2
jmp 0x59dc30
test eax, 0x80000000
je 0x59dc2d
or edx, 8
jmp 0x59dc30
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 0x59dbb3
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x78], eax
test eax, eax
je 0x59dc70
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 0x59dc96
mov eax, dword [ebp - 0x10]
call fcn.004040e0
ret