Function at 0x1003a3f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x101b2070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
lea ebx, [edi + 0x58]
test esi, esi
je 0x1003a487
cmp word [esi], 0
je 0x1003a487
mov eax, 0x1c
call fcn.1011fc40
mov ebx, esp
call fcn.10033c60
mov word [ebx], ax
cmp ax, 2
je 0x1003a454
cmp ax, 0x17
je 0x1003a45b
push 0x2741
call dword [sym.imp.WS2_32.dll_WSASetLastError]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x1003a5fc
mov ecx, 0x10
jmp 0x1003a460
mov ecx, 0x1c
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x14]
push ecx
push ebx
movzx edx, ax
push 0
push edx
push esi
call dword [sym.imp.WS2_32.dll_WSAStringToAddressW]
test eax, eax
je 0x1003a484
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x1003a5fc
mov ecx, dword [ebp - 0x1c]
movzx eax, word [ebx]
cmp eax, 2
je 0x1003a4d2
cmp eax, 0x17
je 0x1003a4d2
mov dword [ebp - 0x14], 0
movzx eax, word [ecx]
push 6
push 1
push eax
mov dword [ebp - 0x18], 0
call dword [sym.imp.WS2_32.dll_socket]
mov esi, dword [ebp - 0x20]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x1003a5f0
mov edx, dword [edi + 0x2c]
test edx, edx
je 0x1003a4e8
cmp dword [edi + 0x30], 0
jbe 0x1003a4e8
mov ecx, 1
jmp 0x1003a4ea
mov dword [ebp - 0x14], 1
cmp ax, word [ecx]
je 0x1003a49b
mov eax, 0x273f
jmp 0x1003a5fc
xor ecx, ecx
push 0
push 0
mov dword [ebp - 0xc], edx
lea edx, [ebp - 0x24]
push edx
push 0
mov dword [ebp - 0x10], ecx
mov ecx, dword [edi + 0x30]
push 0
push 0xc
mov dword [ebp - 8], ecx
lea ecx, [ebp - 0x10]
push ecx
push 0x98000004
push eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
jne 0x1003a535
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1003a535
cmp eax, 0xffffffff
jne 0x1003a535
push 0x80004005
call fcn.10002670
mov eax, dword [esi]
mov edx, dword [edi + 0x34]
push 4
lea ecx, [ebp - 0x24]
push ecx
push 4
push 0xffff
push eax
mov dword [ebp - 0x24], edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x1003a560
push 0x80004005
call fcn.10002670
cmp word [ebp + 0xc], 0
jne 0x1003a596
cmp dword [ebp - 0x14], 0
je 0x1003a571
mov eax, ebx
jmp 0x1003a580
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx]
push eax
call fcn.10037fe0
add esp, 4
xor ecx, ecx
cmp word [eax], 2
setne cl
dec ecx
and ecx, 0xfffffff4
add ecx, 0x1c
push ecx
mov ecx, dword [esi]
push eax
jmp 0x1003a5e4
cmp dword [ebp - 0x14], 0
je 0x1003a5a0
mov eax, ebx
jmp 0x1003a5af
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx]
push eax
call fcn.10037fe0
add esp, 4
mov esi, eax
mov ecx, 7
lea edi, [ebp - 0x40]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x3e], ax
xor eax, eax
cmp word [ebp - 0x40], 2
lea edx, [ebp - 0x40]
setne al
dec eax
and eax, 0xfffffff4
add eax, 0x1c
push eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x1003a5f9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
lea esp, [ebp - 0x4c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1011bab4
mov esp, ebp
pop ebp
ret 0xc