Function at 0x10037900
Capabilities:
Initialize winsock library

Disassembly:
push ebp
lea ebp, [esp - 0x194]
sub esp, 0x194
push 0xffffffffffffffff
push 0x10069b75
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x100ad040]
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 edi, dword [ebp + 0x19c]
mov dword [ebp - 0x40], edi
mov byte [ebp - 0x3c], 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x40]
call fcn.10037260
mov dword [ebp - 4], 2
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x10]
push eax
push 0x10093cf4
xor ebx, ebx
push str.AI_BIND_TCP_HOST
mov dword [ebp - 0x1c], ebx
push edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.msi.dll_MsiGetSummaryInformationW]
lea edx, [ebx + 2]
cmp eax, 0xea
jne 0x100379ee
mov esi, dword [ebp - 0x10]
xor ecx, ecx
inc esi
mov eax, esi
mov dword [ebp - 0x10], esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.AI_BIND_TCP_HOST
mov dword [ebp - 0x1c], ebx
push edi
mov dword [ebp - 0x20], esi
call dword [sym.imp.msi.dll_MsiGetSummaryInformationW]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x10]
push eax
push 0x10093cf4
xor esi, esi
push str.AI_BIND_TCP_PORT
mov dword [ebp - 0x14], esi
push edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.msi.dll_MsiGetSummaryInformationW]
cmp eax, 0xea
jne 0x10037a63
mov esi, dword [ebp - 0x10]
xor ecx, ecx
inc esi
mov edx, 2
mov eax, esi
mov dword [ebp - 0x10], esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x18], esi
mov esi, dword [ebp - 0x14]
push esi
push str.AI_BIND_TCP_PORT
push edi
call dword [sym.imp.msi.dll_MsiGetSummaryInformationW]
push 0xa
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, esi
call fcn.1002dc60
movzx ecx, word [esi]
add esp, 4
mov dword [ebp - 0x10], eax
mov edx, ecx
test cx, cx
je 0x10037aae
mov ecx, esi
nop dword [eax + eax]
lea eax, [edx - 0x30]
cmp ax, 9
ja 0x10037bc4
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x10037a90
mov eax, dword [ebp - 0x10]
test eax, eax
jle 0x10037bc4
cmp eax, 0xffff
jge 0x10037bc4
movzx eax, ax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 5
xor esi, esi
mov eax, ebx
cmp word [ebx], si
je 0x10037b26
lea eax, [eax + 2]
inc esi
cmp word [eax], 0
jne 0x10037ae2
test esi, esi
je 0x10037b26
inc esi
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x24], eax
mov edx, ebx
movzx ebx, word [ebx]
mov ecx, eax
mov dword [ebp - 0x28], esi
test bx, bx
je 0x10037b20
nop dword [eax]
mov byte [ecx], bl
lea edx, [edx + 2]
movzx eax, word [edx]
inc ecx
mov bl, al
test ax, ax
jne 0x10037b10
mov ebx, dword [ebp - 0x1c]
mov byte [ecx], 0
push 0x190
lea eax, [ebp]
push 0
push eax
call fcn.1004f160
add esp, 0xc
lea eax, [ebp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10037b62
push str.SockError
push str.AI_PORT_TEST_RES
push edi
call dword [sym.imp.msi.dll_MsiSummaryInfoGetPropertyCount]
mov esi, dword [ebp - 0x24]
jmp 0x10037ba2
mov esi, dword [ebp - 0x24]
mov ecx, esi
mov edx, dword [ebp - 0x10]
call fcn.10014ee0
cmp eax, 1
jne 0x10037b7b
push str.UsedPort
jmp 0x10037b90
test eax, eax
jne 0x10037b86
push str.FreePort
jmp 0x10037b90
cmp eax, 2
jne 0x10037b9c
push str.SockError
push str.AI_PORT_TEST_RES
push edi
call dword [sym.imp.msi.dll_MsiSummaryInfoGetPropertyCount]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov byte [ebp - 4], 4
test esi, esi
je 0x10037bb1
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
jmp 0x10037bd5
push str.SockError
push str.AI_PORT_TEST_RES
push edi
call dword [sym.imp.msi.dll_MsiSummaryInfoGetPropertyCount]
mov byte [ebp - 4], 3
test esi, esi
je 0x10037be4
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 2
test ebx, ebx
je 0x10037c01
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.10037180
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.1004d40a
lea esp, [ebp + 0x194]
pop ebp
ret 4