Function at 0x10046640
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xaa0
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x10259a9c], 0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
jne 0x100466b0
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
lea eax, [ebp - 0xaa0]
push eax
call fcn.10185940
add esp, 4
call fcn.1015e4d0
cmp dword [0x10259a9c], 0
jne 0x100466b0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10212f74
mov esp, ebp
pop ebp
ret
push 0xa90
lea eax, [ebp - 0xa98]
push 0
push eax
call fcn.102134e7
add esp, 0xc
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x100468b6
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
lea ecx, [ebp - 0xa9c]
push esi
mov dword [ebp - 0xa9c], eax
call fcn.10004a70
test al, al
jne 0x1004671c
test esi, esi
jne 0x100466fb
xor ecx, ecx
jmp 0x1004670f
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10046700
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0xa9c]
call fcn.10004050
mov eax, dword [ebp - 0xa9c]
mov eax, dword [eax - 0xc]
add eax, eax
push eax
lea eax, [ebp - 0x288]
push esi
push eax
call fcn.102134e1
add esp, 0xc
test edi, edi
jne 0x10046740
xor ecx, ecx
jmp 0x10046754
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10046745
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0xa9c]
call fcn.10004050
mov eax, dword [ebp - 0xa9c]
mov eax, dword [eax - 0xc]
add eax, eax
push eax
lea eax, [ebp - 0xa98]
push edi
push eax
call fcn.102134e1
add esp, 0xc
test ebx, ebx
jne 0x10046785
xor ecx, ecx
jmp 0x1004679f
mov ecx, ebx
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10046790
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0xa9c]
call fcn.10004050
mov eax, dword [ebp - 0xa9c]
mov eax, dword [eax - 0xc]
add eax, eax
push eax
lea eax, [ebp - 0x88]
push ebx
push eax
call fcn.102134e1
mov eax, dword [ebp + 0x18]
add esp, 0xc
mov dword [ebp - 8], eax
call fcn.10003980
mov ecx, eax
test ecx, ecx
je 0x100468b6
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
lea esi, [ebp - 0xa98]
mov dword [ebp - 0xaa0], eax
mov ecx, 0x2a5
lea eax, [ebp - 0xaa0]
push eax
sub esp, 0xa94
xor eax, eax
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x14]
test edi, edi
setne al
inc eax
push eax
call fcn.10036f80
mov esi, dword [ebp - 0xaa0]
add esp, 0xa9c
cmp eax, 1
jne 0x1004686c
push 1
test edi, edi
je 0x1004685a
mov ecx, 0x1025a378
call fcn.10009a80
push 1
push 1
push esi
mov edi, eax
call fcn.100e4770
add esp, 0xc
mov ecx, 0x1025a378
push edi
call fcn.10009a80
mov ebx, 1
jmp 0x1004686e
push 1
push esi
call fcn.100e4770
add esp, 0xc
mov ebx, 1
jmp 0x1004686e
xor ebx, ebx
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10046888
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0xa9c]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x100468a3
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.100030c0
int3