Function at 0x412a20
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x5b4fc7
mov eax, dword fs:[0]
push eax
sub esp, 0x1ac
mov eax, dword [0x630490]
xor eax, esp
mov dword [esp + 0x1a4], eax
push esi
push edi
mov eax, dword [0x630490]
xor eax, esp
push eax
lea eax, [esp + 0x1b8]
mov dword fs:[0], eax
mov esi, edx
mov dword [esp + 0xb0], esi
mov edi, ecx
mov dword [esp + 0x18], edi
lea ecx, [esp + 0xcc]
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], 0
call fcn.0040a220
mov dword [esp + 0x1c0], 0
xorps xmm0, xmm0
movq qword [esp + 0xb4], xmm0
mov dword [esp + 0xbc], 0
mov dword [esp + 0x104], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0xb8], 0
mov dword [esp + 0xbc], 0
lea eax, [esp + 0xb4]
mov byte [esp + 0x1c0], 1
cmp esi, 0xffffffff
mov esi, dword [ebp + 8]
push eax
jne 0x412afb
mov edx, dword [ebp + 0xc]
mov ecx, esi
call fcn.004464c0
add esp, 4
jmp 0x412b0f
push dword [ebp + 0xc]
mov ecx, dword [esp + 0xb8]
mov edx, esi
call fcn.00446650
add esp, 8
mov ecx, dword [esp + 0xb8]
mov eax, 0x2aaaaaab
sub ecx, dword [esp + 0xb4]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x412bc2
mov edx, 0x7df098
mov dword [esp + 0x104], 1
lea ecx, [esp + 0x54]
mov byte [esp + 0xcc], al
call fcn.00442740
lea esi, [eax + 8]
lea eax, [esp + 0xd0]
cmp eax, esi
je 0x412ba5
cmp dword [esp + 0xe4], 0x10
jb 0x412b7a
push dword [esp + 0xd0]
call fcn.0044f9f1
add esp, 4
push esi
lea ecx, [esp + 0xd4]
mov dword [esp + 0xe8], 0xf
mov dword [esp + 0xe4], 0
mov byte [esp + 0xd4], 0
call fcn.004045c0
lea ecx, [esp + 0x54]
call fcn.004110c0
lea eax, [esp + 0xcc]
mov ecx, edi
push eax
call fcn.00413370
jmp 0x413183
cmp dword [esp + 0xb0], 0xffffffff
je 0x412cff
cmp esi, 1
jne 0x412cff
mov esi, dword [esp + 0xb4]
lea ecx, [esp + 0x114]
mov edx, dword [esi + 4]
call fcn.004360f0
xorps xmm0, xmm0
mov dword [esp + 0xc8], 0
movq qword [esp + 0xc0], xmm0
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0
mov dword [esp + 0xc8], 0
sub esp, 0x18
mov byte [esp + 0x1d8], 3
mov ecx, esp
lea eax, [esp + 0x12c]
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.004047d0
lea ecx, [esp + 0xd8]
call fcn.00417f80
mov eax, dword [esp + 0xdc]
add esp, 0x18
sub eax, dword [esp + 0xc0]
sar eax, 2
test eax, eax
je 0x412cdf
push 0x602695
lea ecx, [esp + 0xd4]
mov dword [esp + 0x108], 1
mov byte [esp + 0xd0], 0
call fcn.00405a30
lea eax, [esp + 0xcc]
mov ecx, edi
push eax
call fcn.00413370
lea ecx, [esp + 0xc0]
call fcn.00407920
lea ecx, [esp + 0x114]
call fcn.00404560
push esi
call fcn.0044f9f1
add esp, 4
lea ecx, [esp + 0xcc]
call fcn.00406730
jmp 0x4131e7
lea ecx, [esp + 0xc0]
call fcn.00407920
lea ecx, [esp + 0x114]
mov byte [esp + 0x1c0], 1
call fcn.00404560
mov eax, dword [esp + 0xb4]
mov esi, eax
cmp eax, dword [esp + 0xb8]
je 0x4130f4
movq xmm0, qword [esi]
mov eax, dword [esi + 8]
push 0
push 1
push 2
movq qword [esp + 0x54], xmm0
mov dword [esp + 0x28], eax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [esp + 0x10], edi
cmp edi, 0xffffffff
je 0x41320c
push 4
lea eax, [esp + 0xb4]
mov dword [esp + 0xb4], 0x40000
push eax
push 0x1002
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0xb4]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x13c]
call fcn.004360f0
push 0x1c8
mov byte [esp + 0x1c4], 5
call fcn.0044f9bb
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
mov byte [esp + 0x1c0], 6
test edi, edi
je 0x412dd8
push 0x1c8
push 0
push edi
call fcn.0057bcd0
add esp, 8
mov ecx, edi
call fcn.00416a80
mov edi, eax
mov dword [esp + 0x14], eax
jmp 0x412dde
xor edi, edi
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov byte [esp + 0x1c0], 5
mov dword [edi + 0x30], eax
mov eax, dword [0x631718]
mov dword [edi + 0x58], eax
mov eax, dword [0x631714]
mov dword [edi + 0x5c], eax
mov eax, dword [0x6402bc]
cmp eax, 0x64
mov dword [edi + 4], 0x4140e0
cmovge eax, ecx
mov dword [edi + 8], 0x4141e0
inc eax
mov dword [edi + 0xc], fcn.004057d0
lea ecx, [esp + 0x28]
mov dword [edi + 0x10], fcn.00414200
mov dword [edi + 0x14], 0x414540
mov byte [edi + 0x4e], 1
mov dword [0x6402bc], eax
mov dword [edi + 0x11c], eax
call fcn.00424c40
mov ecx, eax
lea eax, [edi + 0x18]
mov dword [esp + 0x10], ecx
cmp eax, ecx
je 0x412e83
cmp dword [eax + 0x14], 0x10
jb 0x412e6a
push dword [eax]
call fcn.0044f9f1
mov ecx, dword [esp + 0x14]
lea eax, [edi + 0x18]
add esp, 4
push ecx
mov dword [eax + 0x14], 0xf
mov ecx, eax
mov dword [eax + 0x10], 0
mov byte [eax], 0
call fcn.004045c0
cmp dword [esp + 0x3c], 0x10
jb 0x412e96
push dword [esp + 0x28]
call fcn.0044f9f1
add esp, 4
mov eax, dword [esp + 0x48]
lea ecx, [edi + 0x124]
mov dword [edi + 0x140], eax
lea eax, [esp + 0x13c]
mov byte [edi + 0x120], 0
cmp ecx, eax
je 0x412ec2
push 0xffffffffffffffff
push 0
push eax
call fcn.004047d0
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x144], eax
call fcn.0059a07f
sub eax, dword [0x640698]
push 0
sbb edx, dword [0x64069c]
push 0x2710
push edx
push eax
call fcn.0057fce0
mov dword [esp + 0x20], edx
mov dword [edi + 0x148], eax
mov byte [edi + 0x150], 1
call fcn.0044be00
mov ecx, dword [edi + 0x140]
mov edx, 0xd3d
mov dword [edi + 0x64], eax
cmp ecx, 0xb4
mov eax, 0x12c
cmove eax, edx
cmp ecx, 0x1f4
jl 0x412f33
cmp ecx, 0x257
mov ecx, 0x1b58
cmovle eax, ecx
mov edx, 0x604282
mov word [edi + 0x13c], ax
lea ecx, [esp + 0x154]
call fcn.00442740
mov byte [esp + 0x1c0], 7
lea ecx, [esp + 0x28]
mov edx, dword [edi + 0x11c]
call fcn.004057e0
mov edi, eax
push 3
push 0
push 0x605470
lea ecx, [esp + 0x168]
mov byte [esp + 0x1cc], 8
call fcn.00415240
push 0xffffffffffffffff
push 0
push edi
push 3
push eax
lea ecx, [esp + 0x170]
call fcn.00409c40
lea ecx, [esp + 0x15c]
cmp ecx, eax
je 0x412faa
push 0xffffffffffffffff
push 0
push eax
call fcn.004047d0
mov byte [esp + 0x1c0], 7
cmp dword [esp + 0x3c], 0x10
jb 0x412fc5
push dword [esp + 0x28]
call fcn.0044f9f1
add esp, 4
cmp dword [0x64046c], 0
je 0x412ff5
push 0x640454
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esp + 0x154]
push eax
call dword [0x64046c]
add esp, 4
push 0x640454
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xorps xmm0, xmm0
lea ecx, [esp + 0x114]
movdqa xmmword [esp + 0x114], xmm0
movq qword [esp + 0x124], xmm0
call fcn.00599d92
mov eax, dword [esp + 0x14]
mov dword [esp + 0x114], 0x605500
mov dword [esp + 0x124], 0x412710
mov dword [esp + 0x128], eax
lea eax, [esp + 0xc0]
mov byte [esp + 0x1c0], 9
push eax
lea ecx, [esp + 0x118]
call fcn.00599e8a
lea ecx, [esp + 0x114]
call fcn.00599e03
mov byte [esp + 0x1c0], 0xa
mov eax, dword [esp + 0xc4]
test eax, eax
jne 0x413083
push 1
call fcn.00599cbe
mov eax, dword [esp + 0xc8]
add esp, 4
push eax
push dword [esp + 0xc4]
call fcn.00599d3d
add esp, 8
test eax, eax
je 0x4130a0
push eax
call fcn.00599c91
add esp, 4
lea ecx, [esp + 0x154]
mov dword [esp + 0xc4], 0
mov byte [esp + 0xcc], 1
call fcn.004110c0
mov byte [esp + 0x1c0], 1
cmp dword [esp + 0x150], 0x10
jb 0x4130e0
push dword [esp + 0x13c]
call fcn.0044f9f1
add esp, 4
add esi, 0xc
cmp esi, dword [esp + 0xb8]
jne 0x412d15
mov edi, dword [esp + 0x18]
movzx eax, byte [esp + 0xcc]
lea ecx, [edi + 4]
mov byte [edi], al
movzx eax, byte [esp + 0xcd]
mov byte [edi + 1], al
lea eax, [esp + 0xd0]
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.004047d0
push 0xffffffffffffffff
lea ecx, [edi + 0x1c]
mov byte [esp + 0x1c4], 0xb
push 0
lea eax, [esp + 0xf0]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push eax
mov byte [ecx], 0
call fcn.004047d0
mov eax, dword [esp + 0x100]
mov dword [edi + 0x34], eax
mov eax, dword [esp + 0x104]
mov dword [edi + 0x38], eax
mov eax, dword [esp + 0x10c]
mov dword [edi + 0x40], eax
mov eax, dword [esp + 0x110]
mov dword [edi + 0x44], eax
mov eax, dword [esp + 0xb4]
test eax, eax
je 0x413197
push eax
call fcn.0044f9f1
add esp, 4
cmp dword [esp + 0xfc], 0x10
jb 0x4131b0
push dword [esp + 0xe8]
call fcn.0044f9f1
add esp, 4
cmp dword [esp + 0xe4], 0x10
mov byte [esp + 0xe8], 0
mov dword [esp + 0xf8], 0
mov dword [esp + 0xfc], 0xf
jb 0x4131e7
push dword [esp + 0xd0]
call fcn.0044f9f1
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x1b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.005778cb
mov esp, ebp
pop ebp
ret
mov byte [esp + 0xcc], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [esp + 0x28]
call fcn.004057e0
push eax
mov edx, str.create_socket_error:
mov byte [esp + 0x1c4], 4
lea ecx, [esp + 0x118]
call fcn.00405a70
mov esi, eax
add esp, 4
lea eax, [esp + 0xd0]
cmp eax, esi
je 0x413293
cmp dword [esp + 0xe4], 0x10
jb 0x413268
push dword [esp + 0xd0]
call fcn.0044f9f1
add esp, 4
push esi
lea ecx, [esp + 0xd4]
mov dword [esp + 0xe8], 0xf
mov dword [esp + 0xe4], 0
mov byte [esp + 0xd4], 0
call fcn.004045c0
cmp dword [esp + 0x128], 0x10
jb 0x4132ac
push dword [esp + 0x114]
call fcn.0044f9f1
add esp, 4
mov byte [esp + 0x1c0], 1
cmp dword [esp + 0x3c], 0x10
mov dword [esp + 0x128], 0xf
mov dword [esp + 0x124], 0
mov byte [esp + 0x114], 0
jb 0x4132e5
push dword [esp + 0x28]
call fcn.0044f9f1
add esp, 4
mov esi, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
mov ecx, esi
call fcn.00413370
mov eax, dword [esp + 0xb4]
test eax, eax
je 0x41330c
push eax
call fcn.0044f9f1
add esp, 4
cmp dword [esp + 0xfc], 0x10
jb 0x413325
push dword [esp + 0xe8]
call fcn.0044f9f1
add esp, 4
cmp dword [esp + 0xe4], 0x10
mov dword [esp + 0xfc], 0xf
mov dword [esp + 0xf8], 0
mov byte [esp + 0xe8], 0
jb 0x41335c
push dword [esp + 0xd0]
call fcn.0044f9f1
add esp, 4
mov eax, esi
jmp 0x4131e9