Function at 0x10016ce0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
lea ebp, [esp - 0x194]
sub esp, 0x194
push 0xffffffffffffffff
push 0x10039f85
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x10059024]
xor eax, ebp
mov dword [ebp + 0x190], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x19c]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x44], ebx
mov byte [ebp - 0x40], 1
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x44]
call fcn.10016740
mov dword [ebp - 4], 2
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x20]
push eax
mov edx, str.AI_BIND_TCP_HOST
mov ecx, ebx
call fcn.10010bc0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x18]
push eax
mov edx, str.AI_BIND_TCP_PORT
mov ecx, ebx
call fcn.10010bc0
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x10]
push 0xa
mov dword [ebp - 0x10], 0xffffffff
call fcn.1000fd60
mov ecx, dword [ebp - 0x14]
mov esi, eax
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 0xc
movzx eax, word [ecx]
test ax, ax
je 0x10016deb
mov edx, eax
nop
lea eax, [edx - 0x30]
cmp ax, 9
ja 0x10016f13
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x10016dd0
test esi, esi
jle 0x10016f13
cmp esi, 0xffff
jge 0x10016f13
movzx eax, si
xor edi, edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], edi
mov byte [ebp - 4], 5
xor esi, esi
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
cmp word [ecx], si
je 0x10016e66
lea eax, [eax + 2]
inc esi
cmp word [eax], 0
jne 0x10016e21
test esi, esi
je 0x10016e66
inc esi
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov dword [ebp - 0x24], edi
mov ecx, edi
mov eax, dword [ebp - 0x1c]
mov edx, eax
mov dword [ebp - 0x28], esi
movzx ebx, word [eax]
test bx, bx
je 0x10016e60
mov byte [ecx], bl
lea edx, [edx + 2]
movzx eax, word [edx]
inc ecx
mov bl, al
test ax, ax
jne 0x10016e50
mov ebx, dword [ebp - 0x2c]
mov byte [ecx], 0
push 0x190
lea eax, [ebp]
push 0
push eax
call fcn.10026360
add esp, 0xc
lea eax, [ebp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10016e9f
push str.SockError
push str.AI_PORT_TEST_RES
push ebx
call dword [sym.imp.msi.dll_MsiSummaryInfoGetPropertyCount]
jmp 0x10016edc
mov edx, dword [ebp - 0x10]
mov ecx, edi
call fcn.10004530
cmp eax, 1
jne 0x10016eb5
push str.UsedPort
jmp 0x10016eca
test eax, eax
jne 0x10016ec0
push str.FreePort
jmp 0x10016eca
cmp eax, 2
jne 0x10016ed6
push str.SockError
push str.AI_PORT_TEST_RES
push ebx
call dword [sym.imp.msi.dll_MsiSummaryInfoGetPropertyCount]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov byte [ebp - 4], 4
test edi, edi
je 0x10016efd
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
call edi
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
jmp 0x10016f24
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
jmp 0x10016f24
push str.SockError
push str.AI_PORT_TEST_RES
push ebx
call dword [sym.imp.msi.dll_MsiSummaryInfoGetPropertyCount]
mov byte [ebp - 4], 3
push dword [ebp - 0x14]
call edi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10016f49
push eax
call edi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.10016660
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x190]
xor ecx, ebp
call fcn.10024a34
lea esp, [ebp + 0x194]
pop ebp
ret 4