Function at 0x402a07
Capabilities:
Create thread
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3d8
or dword [ebp - 0x18], 0xffffffff
push ebx
push esi
push edi
push 0x104
push 0
lea eax, [ebp - 0x14c]
push eax
call fcn.00401d2e
mov edi, dword [ebp + 8]
movzx esi, byte [edi + 0x10]
mov ebx, edi
call fcn.00402304
mov esi, eax
mov dword [ebp - 0x14], esi
cmp esi, 0xffffffff
jne 0x402a53
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x274c
jne 0x402e90
push 0
push dword [0x404ddc]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp eax, 0x102
jne 0x402e90
cmp esi, 0xffffffff
je 0x402a2a
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x1cc]
push eax
push esi
mov dword [ebp - 0x34], 0x80
call dword [sym.imp.WS2_32.dll_accept]
xor ebx, ebx
inc ebx
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x402b33
push 4
lea ecx, [ebp - 0x28]
push ecx
push ebx
push 6
push eax
mov dword [ebp - 0x28], ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
xor esi, esi
push esi
push esi
lea eax, [ebp - 0x44]
push eax
push esi
push esi
push 0xc
lea eax, [ebp - 0x40]
push eax
push 0x98000004
push dword [ebp - 0xc]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], 0x493e0
mov dword [ebp - 0x38], 0x1388
call dword [sym.imp.WS2_32.dll_WSAIoctl]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x3d4]
push eax
xor eax, eax
cmp word [ebp - 0x1cc], 2
push esi
setne al
mov dword [ebp - 0x28], 0x104
dec eax
and eax, 0xfffffff4
add eax, 0x1c
push eax
lea eax, [ebp - 0x1cc]
push eax
call dword [sym.imp.WS2_32.dll_WSAAddressToStringW]
test eax, eax
je 0x402b30
push 6
push 0x4010dc
lea eax, [ebp - 0x3d4]
push eax
call fcn.00401d17
xor eax, eax
mov word [ebp - 0x3ce], ax
mov esi, dword [ebp - 0x14]
mov al, byte [edi + 0x10]
xor cl, cl
test al, al
je 0x402b4b
movzx edx, cl
cmp esi, dword [edi + edx*4]
je 0x402b6b
add cl, 2
cmp cl, al
jb 0x402b3c
cmp al, bl
jbe 0x402a2a
movzx ecx, bl
cmp esi, dword [edi + ecx*4]
je 0x402cfa
add bl, 2
cmp bl, al
jb 0x402b53
jmp 0x402a2a
mov edi, dword [ebp - 0xc]
cmp edi, 0xffffffff
jne 0x402b85
push 0x45
pop eax
mov ecx, 0x401570
call fcn.004023b1
jmp 0x402a2a
lea eax, [ebp - 0x10]
push eax
push 4
pop eax
call fcn.00402130
test al, al
je 0x402bc0
cmp word [ebp - 0x10], 4
jbe 0x402bc0
movzx eax, word [ebp - 0x10]
call fcn.00401ce3
mov esi, eax
test esi, esi
jne 0x402bcc
movzx eax, word [ebp - 0xe]
movzx ecx, word [ebp - 0x10]
lea eax, [eax + ecx - 4]
push eax
push dword [ebp - 0xc]
call fcn.0040219c
push 0x45
mov ecx, 0x401570
jmp 0x402d07
movzx eax, word [ebp - 0x10]
mov edi, dword [ebp - 0xc]
sub eax, 4
push esi
call fcn.00402130
push esi
test al, al
jne 0x402be8
call fcn.00401cfb
jmp 0x402bc0
mov ax, word [ebp - 0xe]
mov word [ebp - 0x22], ax
mov al, byte [esi]
mov byte [ebp - 0x20], al
call fcn.00401cfb
cmp word [ebp - 0xe], 0
jne 0x402c4b
and dword [ebp - 0x14], 0
cmp byte [ebp - 0x20], bl
jne 0x402c7a
mov esi, dword [ebp - 0x18]
call fcn.0040239b
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
call fcn.00401d7b
mov esi, eax
test esi, esi
jne 0x402c2b
mov eax, 0x4015fc
lea ecx, [ebp - 0x3d4]
push ecx
push eax
push 0x401600
call fcn.004023fb
add esp, 0xc
push esi
call fcn.00401cfb
jmp 0x402ced
movzx eax, word [ebp - 0xe]
call fcn.00401ce3
mov esi, eax
movzx eax, word [ebp - 0xe]
test esi, esi
je 0x402bb7
mov edi, dword [ebp - 0xc]
push esi
call fcn.00402130
test al, al
jne 0x402c75
push esi
jmp 0x402be1
mov dword [ebp - 0x14], esi
jmp 0x402c05
cmp byte [ebp - 0x20], 3
jne 0x402cd4
cmp word [ebp - 0x22], 4
jne 0x402cd4
mov ebx, 0x404ff4
push ebx
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
call fcn.004027a6
test eax, eax
jne 0x402cbc
mov esi, dword [ebp - 0xc]
call fcn.0040239b
mov eax, dword [ebp - 0x14]
push dword [eax]
push 0x401670
call fcn.004023fb
pop ecx
pop ecx
jmp 0x402ccb
mov ecx, dword [ebp - 0xc]
push dword [eax + 8]
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.DLL_SetEvent]
push ebx
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
jmp 0x402ced
mov esi, dword [ebp - 0xc]
call fcn.0040239b
movzx eax, byte [ebp - 0x20]
push eax
push 0x4016e8
call fcn.004023fb
pop ecx
pop ecx
push dword [ebp - 0x14]
call fcn.00401cfb
jmp 0x402a2a
cmp dword [ebp - 0xc], 0xffffffff
jne 0x402d12
push 0x2e
mov ecx, 0x401768
pop eax
call fcn.004023b1
jmp 0x402e83
mov edi, dword [ebp - 0x18]
cmp edi, 0xffffffff
jne 0x402d32
lea eax, [ebp - 0x3d4]
push eax
push 0x4017c8
call fcn.004023fb
pop ecx
pop ecx
jmp 0x402e83
push dword [ebp - 0xc]
call fcn.004027d7
push eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x3d4]
push eax
push 0x401880
call fcn.004023fb
xor ebx, ebx
add esp, 0xc
cmp dword [ebp - 0x1c], ebx
jbe 0x402e60
mov esi, dword [sym.imp.WS2_32.dll_send]
push 5
pop eax
push 4
mov word [ebp - 0x30], ax
pop eax
push ebx
mov word [ebp - 0x2e], ax
push 5
lea eax, [ebp - 0x30]
push eax
push edi
mov byte [ebp - 0x2c], 2
call esi
cmp eax, 5
jne 0x402e60
push ebx
push 4
lea eax, [ebp - 0x1c]
push eax
push edi
call esi
cmp eax, 4
jne 0x402e60
cmp byte [ebp - 0x14c], 0x40
jb 0x402e01
push 0x9b
call dword [sym.imp.KERNEL32.DLL_SetLastError]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push 0x4018f0
call fcn.004023fb
mov eax, dword [ebp - 0x1c]
pop ecx
pop ecx
call fcn.004028a2
mov byte [ebp - 6], bl
mov byte [ebp - 5], bl
cmp byte [ebp - 0x14c], bl
jbe 0x402e52
movzx esi, byte [ebp - 6]
lea esi, [ebp + esi*4 - 0x148]
mov eax, dword [esi]
cmp eax, ebx
je 0x402e44
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x402e34
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [esi], ebx
jmp 0x402e44
mov eax, 0x402947
mov ecx, eax
test ecx, ecx
je 0x402dca
push ebx
push ebx
push dword [ebp - 0x1c]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateThread]
cmp eax, ebx
je 0x402daf
movzx ecx, byte [ebp - 0x14c]
mov dword [ebp + ecx*4 - 0x148], eax
inc byte [ebp - 0x14c]
jmp 0x402dca
movzx eax, byte [ebp - 5]
mov ecx, dword [esi]
inc byte [ebp - 5]
mov dword [ebp + eax*4 - 0x148], ecx
inc byte [ebp - 6]
mov al, byte [ebp - 6]
cmp al, byte [ebp - 0x14c]
jb 0x402dd8
mov al, byte [ebp - 5]
mov byte [ebp - 0x14c], al
jmp 0x402a2a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x401950
call fcn.004023fb
pop ecx
pop ecx
cmp dword [ebp - 0x1c], ebx
jbe 0x402e83
mov esi, edi
call fcn.0040239b
or dword [ebp - 0x18], 0xffffffff
mov esi, dword [ebp - 0xc]
call fcn.0040239b
jmp 0x402a2a
push 0x19
pop eax
mov ecx, 0x401978
call fcn.004023b1
mov esi, dword [ebp - 0x18]
call fcn.0040239b
xor bl, bl
cmp byte [ebp - 0x14c], bl
je 0x402eea
push 0xffffffffffffffff
push 1
lea eax, [ebp - 0x148]
push eax
movzx eax, byte [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForMultipleObjects]
cmp byte [ebp - 0x14c], bl
jbe 0x402eea
movzx eax, bl
push dword [ebp + eax*4 - 0x148]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
inc bl
cmp bl, byte [ebp - 0x14c]
jb 0x402ed0
pop edi
pop esi
pop ebx
leave
ret 4