Function at 0x1003faa0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x348], eax
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x94], ebx
push esi
mov esi, edx
push edi
test eax, eax
jne 0x1003fae4
mov eax, 0x80070057
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x1003faf3
cmp dword [esi], 0
je 0x1003face
cmp dword [esi + 4], 0
je 0x1003face
call fcn.10047120
test al, al
jne 0x1003fb12
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x33c]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov edi, eax
test edi, edi
je 0x1003fb71
test byte [0x10059ab8], 4
je 0x1003fb41
push str.WSAStartup
push edi
call fcn.10001400
add esp, 8
test edi, edi
jg 0x1003fb58
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
movzx eax, di
or eax, 0x80070000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x1003fb87
mov eax, dword [ebx + 8]
mov dword [ebp - 0x340], eax
test eax, eax
je 0x1003fb87
add ebx, 0xc
jmp 0x1003fb9a
push 0xffff
call dword [sym.imp.KERNEL32.dll_GetMaximumProcessorCount]
mov dword [ebp - 0x340], eax
xor ebx, ebx
mov dword [ebp - 0x344], ebx
lea ebx, [eax + eax*4]
shl ebx, 6
sub ebx, 0xffffff80
push ebx
push 0
push dword [0x10059a38]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x1003fbe0
test byte [0x10059ab8], 2
je 0x1003fbd6
push eax
push ebx
push str.CXPLAT_DATAPATH
call fcn.10001500
add esp, 0xc
mov esi, 0x8007000e
jmp 0x10040053
push ebx
push 0
push edi
call fcn.10049330
add esp, 0xc
test esi, esi
je 0x1003fbfa
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov eax, dword [ebp - 0x340]
movzx eax, ax
mov word [edi + 0x70], ax
mov dword [edi + 0x60], eax
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x1003fc1d
test byte [eax], 2
je 0x1003fc1d
mov cl, 1
jmp 0x1003fc1f
xor cl, cl
mov al, byte [edi + 0x73]
push 6
and al, 0xfe
mov byte [ebp - 0x8d], 0
push 1
or al, cl
push 0x17
mov byte [edi + 0x73], al
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1003fc87
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test byte [0x10059abe], 0x20
je 0x1003fd04
push eax
push str._data__RSS_helper_socket_failed_to_open__0x_x
push esi
lea eax, [ebp - 0x8c]
push 0x80
push eax
call fcn.100015f0
add esp, 0x14
lea eax, [ebp - 0x8c]
mov edx, 0x1004cd88
push eax
call fcn.10001490
add esp, 4
jmp 0x1003fd04
push 0
push 0
lea eax, [ebp - 0x94]
push eax
push 1
lea eax, [ebp - 0x8d]
push eax
push 0
push 0
push 0x580000d2
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x1003fcf0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test byte [0x10059abe], 0x20
je 0x1003fcfd
push eax
push str._data__Query_for_SIO_QUERY_RSS_SCALABILITY_INFO_failed__0x_x
push 0xffffffffffffffff
lea eax, [ebp - 0x8c]
push 0x80
push eax
call fcn.100015f0
add esp, 0x14
lea eax, [ebp - 0x8c]
mov edx, 0x1004cd88
push eax
call fcn.10001490
add esp, 4
jmp 0x1003fcfd
cmp byte [ebp - 0x8d], 0
je 0x1003fcfd
or dword [edi + 0x64], 1
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, edi
call fcn.1003f670
mov esi, eax
lfence
test esi, esi
js 0x10040044
push 0x10055104
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x1003fd87
push str.RtlGetVersion
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x1003fd80
push pe_nt_image_headers32
lea eax, [ebp - 0x1a8]
push 0
push eax
call fcn.10049330
add esp, 0xc
mov dword [ebp - 0x1ac], 0x114
lea eax, [ebp - 0x1ac]
mov ecx, ebx
push eax
call dword [0x1004b298]
call ebx
test eax, eax
jne 0x1003fd80
cmp dword [ebp - 0x1a0], 0x4563
jb 0x1003fd80
or dword [edi + 0x64], 0x10
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov byte [edi + 0x72], 1
mov edx, 0x12d4
test dword [edi + 0x64], 2
mov ecx, 0x11c
mov esi, 0xfff7
mov dword [edi + 0x68], 0x48
cmovne ecx, edx
mov edx, 0x5c0
cmovne edx, esi
mov dword [edi + 0x6c], ecx
add edx, ecx
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x340], edx
mov dword [ebp - 0x94], eax
cmp cx, word [edi + 0x70]
jae 0x1003fff1
movzx ecx, ax
mov eax, dword [ebp - 0x344]
lea ebx, [ecx + ecx*4]
shl ebx, 6
add ebx, edi
mov dword [ebx + 0x80], edi
test eax, eax
je 0x1003fdf1
movzx ecx, word [eax + ecx*2]
mov edx, dword [0x10059a78]
movzx eax, cx
xor ecx, ecx
mov word [ebx + 0x8c], ax
mov esi, eax
test edx, edx
je 0x1003fe22
mov eax, dword [0x10059a7c]
nop
cmp word [eax + 0x70], si
je 0x1004003c
inc ecx
sub eax, 0xffffff80
cmp ecx, edx
jb 0x1003fe10
test byte [0x10059ab8], 4
je 0x1003fe42
push 0x1004bf7c
push str.C:__w1_s_srcplatformplatform_worker.c
push 0x13a
call fcn.1003e120
add esp, 0xc
int 0x2c
xor eax, eax
mov dword [ebx + 0x84], eax
lea eax, [ebx + 0x90]
mov dword [ebx + 0x88], 1
push eax
mov dword [eax + 8], 0xd4
mov dword [eax + 0xc], 0x41316351
mov dword [eax + 0x10], 0x100
mov dword [eax + 0x14], 0x10001080
mov dword [eax + 0x18], 0x100010a0
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
lea esi, [ebx + 0xb0]
mov dword [esi + 8], 0xd4
push esi
mov dword [esi + 0xc], 0x41316351
mov dword [esi + 0x14], 0x100428e0
mov dword [esi + 0x18], 0x10042940
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
lea eax, [ebx + 0xd0]
mov dword [esi + 0x10], 0x100
push eax
mov dword [eax + 8], 0x5c0
mov dword [eax + 0xc], 0x36306351
mov dword [eax + 0x10], 0x100
mov dword [eax + 0x14], 0x10001080
mov dword [eax + 0x18], 0x100010a0
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
lea eax, [ebx + 0xf0]
mov dword [eax + 8], 0xffff
push eax
mov dword [eax + 0xc], 0x36306351
mov dword [eax + 0x10], 0x100
mov dword [eax + 0x14], 0x10001080
mov dword [eax + 0x18], 0x100010a0
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
lea esi, [ebx + 0x110]
mov dword [esi + 8], 0x5c0
push esi
mov dword [esi + 0xc], 0x36306351
mov dword [esi + 0x14], 0x10042b80
mov dword [esi + 0x18], 0x10042bc0
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
mov dword [esi + 0x10], 0x2000
lea esi, [ebx + 0x130]
push esi
mov dword [esi + 8], 0xffff
mov dword [esi + 0xc], 0x36306351
mov dword [esi + 0x14], 0x10042ba0
mov dword [esi + 0x18], 0x10042bc0
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
mov ecx, dword [ebp - 0x340]
lea eax, [ebx + 0x150]
mov dword [esi + 0x10], 0x2000
push eax
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0x36306351
mov dword [eax + 0x10], 0x100
mov dword [eax + 0x14], 0x10001080
mov dword [eax + 0x18], 0x100010a0
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
mov eax, dword [ebp - 0x340]
lea esi, [ebx + 0x170]
push esi
mov dword [esi + 8], eax
mov dword [esi + 0xc], 0x36306351
mov dword [esi + 0x14], 0x10041230
mov dword [esi + 0x18], 0x10041290
call dword [sym.imp.KERNEL32.dll_InitializeSListHead]
mov eax, dword [ebp - 0x94]
inc eax
mov dword [esi + 0x10], 0x2000
mov dword [ebp - 0x94], eax
cmp ax, word [edi + 0x70]
jb 0x1003fdd2
mov ecx, 0x10059a80
call fcn.10004730
test al, al
jne 0x10040021
test byte [0x10059ab8], 4
je 0x1004001f
push str.CxPlatRefIncrementNonZero__CxPlatWorkerRundown___RefCount__1_
push str.C:__w1_s_srcplatformdatapath_winuser.c
push 0x562
call fcn.1003e120
add esp, 0xc
int 0x2c
mov eax, dword [ebp - 0x348]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
add eax, 4
jmp 0x1003fe46
push edi
push 0
push dword [0x10059a38]
call dword [sym.imp.KERNEL32.dll_HeapFree]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100483f7
mov esp, ebp
pop ebp
ret