Function at 0x102e5f0
Capabilities:
Initialize winsock library

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c8
mov eax, dword [0x1039004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1a8], eax
xor eax, eax
push ebx
mov dword [ebp - 0x1c4], eax
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x1c8], eax
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x198], eax
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x1a0], eax
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1b4], eax
mov dword [ebp - 0x1b0], eax
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1c4], eax
mov eax, 1
push edi
xor edi, edi
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x1c8], eax
call fcn.010247e0
push eax
lea ecx, [ebp - 0x19c]
push ecx
lea edx, [ebp - 0x1c8]
push edx
push 0x1018578
push esi
call fcn.0102bbe0
test eax, eax
je 0x102e72a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x276d
je 0x102e6b7
cmp eax, 0x2af9
je 0x102e6b7
mov dword [ebp - 0x198], eax
jmp 0x102e826
mov ebx, dword [sym.imp.WS2_32.dll_WSAStartup]
lea eax, [ebp - 0x194]
push eax
push 0x202
call ebx
test eax, eax
je 0x102e6ec
lea ecx, [ebp - 0x194]
push ecx
push 0x101
call ebx
test eax, eax
je 0x102e6ec
mov dword [ebp - 0x198], eax
jmp 0x102e826
mov dword [ebp - 0x1a0], 1
call fcn.010247e0
push eax
lea edx, [ebp - 0x19c]
push edx
lea eax, [ebp - 0x1c8]
push eax
push 0x1018578
push esi
call fcn.0102bbe0
test eax, eax
je 0x102e72a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x198], eax
jmp 0x102e826
mov eax, dword [ebp - 0x19c]
xor esi, esi
test eax, eax
je 0x102e752
mov ecx, dword [eax + 0x18]
movzx ecx, word [ecx]
cmp cx, 2
je 0x102e748
cmp cx, 0x17
jne 0x102e74b
add esi, 1
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x102e736
mov ebx, 8
push ebx
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
test edi, edi
jne 0x102e771
mov dword [ebp - 0x198], ebx
jmp 0x102e826
xor ecx, ecx
mov eax, esi
mov edx, 0x401
mul edx
seto cl
mov dword [edi], esi
mov dword [edi + 4], 0
neg ecx
or ecx, eax
xor eax, eax
mov dword [ebp - 0x1a4], eax
mov eax, ecx
mov ecx, 2
mul ecx
mov ecx, dword [ebp - 0x1a4]
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
mov dword [edi + 4], eax
jne 0x102e7c2
mov dword [ebp - 0x198], ebx
jmp 0x102e826
imul esi, esi, 0x802
push esi
push 0
push eax
call sub.MSVCR80.dll_memset
mov esi, dword [ebp - 0x19c]
add esp, 0xc
test esi, esi
je 0x102e81c
xor ebx, ebx
mov eax, dword [esi + 0x18]
movzx ecx, word [eax]
sub ecx, 2
je 0x102e7f0
sub ecx, 0x15
jne 0x102e815
mov edx, dword [edi + 4]
mov ecx, dword [esi + 0x10]
push 0x802
add edx, ebx
push edx
push ecx
push eax
call fcn.0102cf30
test eax, eax
mov dword [ebp - 0x198], eax
jne 0x102e826
add ebx, 0x802
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x102e7e0
mov edx, dword [ebp - 0x1a8]
mov dword [edx], edi
xor edi, edi
mov esi, dword [ebp - 0x19c]
test esi, esi
je 0x102e84d
mov eax, dword [0x103a4dc]
test eax, eax
jne 0x102e84a
push 0x10394b4
push 2
call fcn.0102b9f0
mov dword [0x103a4dc], eax
push esi
call eax
test edi, edi
je 0x102e86a
mov eax, dword [edi + 4]
test eax, eax
je 0x102e861
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [ebp - 0x1a0], 0
pop edi
pop esi
pop ebx
je 0x102e87c
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x198]
xor ecx, ebp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 8