Function at 0x416200
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov dword [ebp - 0x1c], getsockname
mov eax, dword [ebp + 0xc]
and eax, 1
je 0x41621e
mov dword [ebp - 0x1c], 0x40000000
jmp 0x41622d
mov ecx, dword [ebp + 0xc]
and ecx, 2
je 0x41622d
mov dword [ebp - 0x1c], 0xc0000000
mov dword [ebp - 8], 3
mov edx, dword [ebp + 0xc]
and edx, 0x500
cmp edx, 0x500
jne 0x41624e
mov dword [ebp - 8], 1
jmp 0x41628c
mov eax, dword [ebp + 0xc]
and eax, 0x300
cmp eax, 0x300
jne 0x416266
mov dword [ebp - 8], 2
jmp 0x41628c
mov ecx, dword [ebp + 0xc]
and ecx, 0x100
je 0x41627a
mov dword [ebp - 8], 4
jmp 0x41628c
mov edx, dword [ebp + 0xc]
and edx, 0x200
je 0x41628c
mov dword [ebp - 8], 5
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
and eax, 0x40
je 0x4162a7
mov ecx, dword [ebp - 4]
or ecx, 0x4000100
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
and edx, 0x80000000
je 0x4162bd
mov eax, dword [ebp - 4]
or eax, 0x80000000
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
and ecx, 0x40000000
je 0x4162d4
mov edx, dword [ebp - 4]
or edx, 0x40000000
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
and eax, 0x20000000
je 0x4162ea
mov ecx, dword [ebp - 4]
or ecx, 0x20000000
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
and edx, 0x10000000
je 0x416300
mov eax, dword [ebp - 4]
or eax, 0x10000000
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
and ecx, 0x8000000
je 0x416317
mov edx, dword [ebp - 4]
or edx, 0x8000000
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
and eax, 0x4000000
je 0x41632d
mov ecx, dword [ebp - 4]
or ecx, 0x4000000
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
and edx, 0x2000000
je 0x416343
mov eax, dword [ebp - 4]
or eax, 0x2000000
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
and ecx, 0x1000000
je 0x41635a
mov edx, dword [ebp - 4]
or edx, 0x1000000
mov dword [ebp - 4], edx
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 0xc]
and eax, 8
je 0x416386
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [edx + 0x4cc404]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00416980
add esp, 4
movzx edx, word [ebp + 0x10]
mov dword [ebp - 0x20], edx
push 0
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00408fb0
add esp, 0xc
push eax
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 0xc]
and edx, 8
je 0x41647a
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0xc], 0xffffffff
je 0x41646e
push 2
lea eax, [ebp - 0x24]
push eax
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41646e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41646e
mov edx, dword [ebp - 0x14]
push edx
call fcn.004169a0
add esp, 4
call fcn.00402330
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
sub eax, 3
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x4d
ja case.0x41642c.1
mov ecx, dword [ebp - 0x10]
movzx edx, byte [ecx + 0x416500]
jmp dword [edx*4 + 0x4164ec]
call fcn.00479715
mov dword [eax], 0xc
jmp case.0x41642c.1
call fcn.00479715
mov dword [eax], 0x11
jmp case.0x41642c.1
call fcn.00479715
mov dword [eax], 0xd
jmp case.0x41642c.1
call fcn.00479715
mov dword [eax], 2
or eax, 0xffffffff
jmp 0x4164e8
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.004169a0
add esp, 4
cmp dword [ebp - 0xc], 0xffffffff
jne 0x4164e5
call fcn.00402330
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
sub edx, 3
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0x4d
ja case.0x4164a1.1
mov eax, dword [ebp - 0x18]
movzx ecx, byte [eax + 0x416564]
jmp dword [ecx*4 + 0x416550]
call fcn.00479715
mov dword [eax], 0xc
jmp case.0x4164a1.1
call fcn.00479715
mov dword [eax], 0x11
jmp case.0x4164a1.1
call fcn.00479715
mov dword [eax], 0xd
jmp case.0x4164a1.1
call fcn.00479715
mov dword [eax], 2
mov eax, dword [ebp - 0xc]
jmp 0x4164e8
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret