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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x596c89
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x610490]
xor eax, esp
mov dword [esp + 0x178], eax
push ebx
push esi
push edi
mov eax, dword [0x610490]
xor eax, esp
push eax
lea eax, [esp + 0x190]
mov dword fs:[0], eax
mov dword [esp + 0x14], edx
mov ebx, ecx
mov dword [esp + 0x18], ebx
and dword [esp + 0x20], 0
lea ecx, [esp + 0xcc]
call fcn.00407888
xor edx, edx
lea edi, [esp + 0xa4]
mov dword [esp + 0x198], edx
xor eax, eax
stosd dword es:[edi], eax
mov esi, edx
mov dword [esp + 0x104], edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], edx
mov dword [esp + 0xac], edx
mov ecx, dword [esp + 0x14]
mov edi, dword [ebp + 8]
mov byte [esp + 0x198], 1
cmp ecx, 0xffffffff
jne 0x40ca75
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0xa4]
push eax
mov ecx, edi
call fcn.0042bc28
pop ecx
jmp 0x40cac4
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa0], edx
test edi, edi
jle 0x40cacf
mov esi, edi
mov ebx, ecx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x98]
push eax
mov ecx, ebx
call fcn.0042babf
pop ecx
test al, al
je 0x40cabd
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0xa8]
call fcn.0042c90f
dec esi
jne 0x40ca92
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0xa4]
mov eax, dword [esp + 0xa8]
sub eax, esi
mov dword [esp + 0x14], 0xc
cdq
idiv dword [esp + 0x14]
test eax, eax
jne 0x40cb4f
mov edx, 0x7df098
mov dword [esp + 0x104], 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0xcc], al
call fcn.00429db1
add eax, 8
lea ecx, [esp + 0xd0]
push eax
call fcn.00407163
lea ecx, [esp + 0x3c]
call fcn.0040bc03
lea eax, [esp + 0xcc]
mov ecx, ebx
push eax
call fcn.0040d01d
test esi, esi
je 0x40cb3c
push esi
call fcn.00431b6d
pop ecx
lea ecx, [esp + 0xcc]
call fcn.00405438
mov eax, ebx
jmp 0x40cf67
cmp ecx, 0xffffffff
je 0x40cc54
cmp edi, 1
jne 0x40cc54
mov edx, dword [esi + 4]
lea ecx, [esp + 0xb4]
call fcn.00421e35
xor eax, eax
lea edi, [esp + 0x98]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
sub esp, 0x18
mov byte [esp + 0x1b0], 3
lea eax, [esp + 0xcc]
mov ecx, esp
lea edi, [esp + 0xb0]
push eax
call fcn.00403e6e
mov ecx, edi
call fcn.0040fc10
mov eax, dword [esp + 0xb4]
add esp, 0x18
sub eax, dword [esp + 0x98]
sar eax, 2
test eax, eax
je 0x40cc30
mov edi, 0x5e264d
mov dword [esp + 0x104], 1
push edi
mov byte [esp + 0xd0], 0
call fcn.004035ea
pop ecx
push eax
push edi
lea ecx, [esp + 0xd8]
call fcn.004042b9
lea eax, [esp + 0xcc]
mov ecx, ebx
push eax
call fcn.0040d01d
lea ecx, [esp + 0x98]
call fcn.00405fa3
push 0
push 1
lea ecx, [esp + 0xbc]
call fcn.0040412f
jmp 0x40cb35
lea ecx, [esp + 0x98]
call fcn.00405fa3
push 0
push 1
lea ecx, [esp + 0xbc]
mov byte [esp + 0x1a0], 1
call fcn.0040412f
mov ebx, esi
cmp esi, dword [esp + 0xa8]
je 0x40cf3b
mov esi, ebx
lea edi, [esp + 0xb4]
push 0
push 1
push 2
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x40cf90
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0xb0]
push 4
push eax
push 0x1002
push 0xffff
push edi
mov dword [esp + 0xc4], 0x40000
call esi
push 4
lea eax, [esp + 0xb4]
push eax
push 0x1001
push 0xffff
push edi
call esi
mov edx, dword [esp + 0xb8]
lea ecx, [esp + 0x114]
call fcn.00421e35
push 0x1c8
mov byte [esp + 0x19c], 5
call fcn.00431b37
mov esi, eax
pop ecx
mov dword [esp + 0x1c], esi
mov byte [esp + 0x198], 6
test esi, esi
je 0x40cd17
push 0x1c8
push 0
push esi
call fcn.0055dd80
pop ecx
pop ecx
mov ecx, esi
call fcn.0040efd8
mov esi, eax
jmp 0x40cd19
xor esi, esi
mov byte [esp + 0x198], 5
xor ecx, ecx
mov eax, dword [0x611718]
mov dword [esi + 4], 0x40d8b1
mov dword [esi + 8], 0x40d94e
mov dword [esi + 0xc], fcn.00404abb
mov dword [esi + 0x10], fcn.0040d965
mov dword [esi + 0x14], 0x40db1c
mov dword [esi + 0x30], edi
mov byte [esi + 0x4e], 1
mov dword [esi + 0x58], eax
mov eax, dword [0x611714]
mov dword [esi + 0x5c], eax
mov eax, dword [0x6202bc]
cmp eax, 0x64
mov dword [esp + 0x1c], esi
cmovge eax, ecx
lea ecx, [esp + 0x24]
inc eax
mov dword [0x6202bc], eax
mov dword [esi + 0x11c], eax
call fcn.00417517
push eax
lea ecx, [esi + 0x18]
call fcn.00407163
push 0
push 1
lea ecx, [esp + 0x2c]
call fcn.0040412f
mov eax, dword [esp + 0xb4]
lea ecx, [esi + 0x124]
mov byte [esi + 0x120], 0
mov dword [esi + 0x140], eax
lea eax, [esp + 0x114]
cmp ecx, eax
je 0x40cdc6
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
mov eax, dword [esp + 0xbc]
mov dword [esi + 0x144], eax
call fcn.004173a3
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042f57f
mov dword [esi + 0x64], eax
mov edx, 0xd3d
mov ecx, dword [esi + 0x140]
mov eax, 0x12c
cmp ecx, 0xb4
cmove eax, edx
cmp ecx, 0x1f4
jl 0x40ce1c
cmp ecx, 0x257
mov edx, 0x1b58
cmovle eax, edx
mov edx, 0x604282
mov word [esi + 0x13c], ax
lea ecx, [esp + 0x12c]
call fcn.00429db1
mov byte [esp + 0x198], 7
lea ecx, [esp + 0x24]
mov edx, dword [esi + 0x11c]
call fcn.00404abc
mov esi, eax
mov edi, 0x5e5420
mov byte [esp + 0x198], 8
push edi
call fcn.004035ea
pop ecx
push eax
push 0
push edi
lea ecx, [esp + 0x140]
call fcn.0040e39f
push 0xffffffffffffffff
push 0
push esi
push 3
push eax
lea ecx, [esp + 0x148]
call fcn.00407395
lea ecx, [esp + 0x134]
cmp ecx, eax
je 0x40ce9a
push 0xffffffffffffffff
push 0
push eax
call fcn.0040409b
push 0
push 1
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1a0], 7
call fcn.0040412f
lea ecx, [esp + 0x12c]
call fcn.00429ec9
lea eax, [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0xa0]
call fcn.0040ebca
lea ecx, [esp + 0x98]
mov byte [esp + 0x198], 9
call fcn.00405042
mov byte [esp + 0x198], 7
cmp dword [esp + 0x9c], 0
mov byte [esp + 0xcc], 1
jne 0x40cf8b
lea ecx, [esp + 0x12c]
call fcn.0040bc03
push 0
push 1
lea ecx, [esp + 0x11c]
mov byte [esp + 0x1a0], 1
call fcn.0040412f
add ebx, dword [esp + 0x14]
cmp ebx, dword [esp + 0xa8]
jne 0x40cc63
mov esi, dword [esp + 0xa4]
mov edi, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
mov ecx, edi
call fcn.0040d01d
test esi, esi
je 0x40cf59
push esi
call fcn.00431b6d
pop ecx
lea ecx, [esp + 0xcc]
call fcn.00405438
mov eax, edi
mov ecx, dword [esp + 0x190]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x178]
xor ecx, esp
call fcn.005599c5
mov esp, ebp
pop ebp
ret
call fcn.0055a4d0
xor ebx, ebx
mov byte [esp + 0xcc], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [esp + 0xb4]
call fcn.00404abc
push eax
mov edx, str.create_socket_error:
mov byte [esp + 0x19c], 4
lea ecx, [esp + 0x28]
call fcn.00404c2b
pop ecx
push eax
lea ecx, [esp + 0xd4]
call fcn.00407163
push ebx
push 1
lea ecx, [esp + 0x2c]
call fcn.0040412f
push ebx
push 1
lea ecx, [esp + 0xbc]
mov byte [esp + 0x1a0], 1
call fcn.0040412f
mov edi, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
mov ecx, edi
call fcn.0040d01d
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x40cf59
push eax
jmp 0x40cf53