Function at 0x403f17
Capabilities:
Create thread
Get socket status
Initialize winsock library
Resolve dns
Resume thread
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
mov eax, dword [0x41c050]
xor eax, ebp
mov dword [ebp - 4], eax
or dword [ebp - 0x19c], 0xffffffff
push esi
push edi
xor esi, esi
push 0x190
lea eax, [ebp - 0x198]
push esi
push eax
mov dword [ebp - 0x1a4], esi
mov dword [ebp - 0x1a0], esi
call fcn.0040b7d0
add esp, 0xc
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x1e0]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x198]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
mov edi, eax
cmp edi, esi
jne 0x403fff
xor eax, eax
inc eax
mov dword [ebp - 0x1d8], eax
mov dword [ebp - 0x1e0], eax
lea eax, [ebp - 0x1a0]
push eax
lea eax, [ebp - 0x1e0]
push eax
push str.50370
push str.127.0.0.1
mov dword [ebp - 0x1dc], 2
mov dword [ebp - 0x1d4], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov edi, eax
cmp edi, esi
jne 0x403fff
mov eax, dword [ebp - 0x1a0]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x19c], eax
cmp eax, 0xffffffff
je 0x403fff
mov eax, dword [ebp - 0x1a0]
push dword [eax + 0x10]
push dword [eax + 0x18]
push dword [ebp - 0x19c]
call dword [sym.imp.WS2_32.dll_bind]
mov edi, eax
cmp dword [ebp - 0x1a0], esi
je 0x404019
push dword [ebp - 0x1a0]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov dword [ebp - 0x1a0], esi
cmp edi, esi
jne 0x4041f7
push bind
push dword [ebp - 0x19c]
call dword [sym.imp.WS2_32.dll_listen]
mov dword [ebp - 0x1a8], eax
cmp eax, esi
jne 0x4041f7
xor eax, eax
lea edi, [ebp - 0x1c0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x1b4]
push eax
push 0x8004667e
push dword [ebp - 0x19c]
mov dword [ebp - 0x2e8], esi
mov dword [ebp - 0x1bc], 0x7a120
mov dword [ebp - 0x1b4], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebx + 0x14]
push eax
mov dword [ebx + 0x44], esi
mov dword [ebx + 0x82c], esi
mov dword [ebx + 0x824], esi
mov dword [ebp - 0x1b8], eax
call edi
lea eax, [ebx + 0x2c]
push eax
mov dword [ebp - 0x1b0], eax
call edi
push 0x190
lea eax, [ebx + 0x4c]
push esi
push eax
call fcn.0040b7d0
add esp, 0xc
push esi
push str.main
push str.gbot_v3
call fcn.004057a9
add esp, 0xc
push 0x10
mov eax, 0x13880
push eax
push eax
push ebx
push 0x407e5c
push esi
lea eax, [ebp - 0x1a4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateTimerQueueTimer]
test eax, eax
jne 0x4041d3
or dword [ebp - 0x1a4], 0xffffffff
jmp 0x4041d3
mov ecx, dword [ebp - 0x2e8]
xor eax, eax
cmp ecx, esi
jbe 0x404121
mov edi, dword [ebp - 0x19c]
cmp dword [ebp + eax*4 - 0x2e4], edi
je 0x404127
inc eax
cmp eax, ecx
jb 0x40410b
jmp 0x404127
mov edi, dword [ebp - 0x19c]
cmp eax, ecx
jne 0x40413d
cmp ecx, 0x40
jae 0x40413d
mov dword [ebp + eax*4 - 0x2e4], edi
inc dword [ebp - 0x2e8]
lea eax, [ebp - 0x1c0]
push eax
push esi
push esi
lea eax, [ebp - 0x2e8]
push eax
push esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x4041d3
lea eax, [ebp - 0x2e8]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4041d3
push esi
push esi
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x1ac], eax
cmp eax, 0xffffffff
je 0x4041d3
push 0x844
call fcn.0040a769
pop ecx
cmp eax, esi
je 0x40419c
mov ecx, 0x211
mov esi, ebx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
xor esi, esi
jmp 0x40419e
xor eax, eax
mov ecx, dword [ebp - 0x1ac]
push esi
push 4
push eax
push 0x404250
push esi
push esi
mov dword [eax], ecx
mov dword [eax + 0x840], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, eax
cmp edi, esi
je 0x4041d3
push 0xfffffffffffffffe
push edi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [ebx + 4]
cmp dword [eax], 1
je 0x4040ff
push dword [ebp - 0x1b8]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call edi
push dword [ebp - 0x1b0]
call edi
jmp 0x404203
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1a8], eax
cmp dword [ebp - 0x19c], 0xffffffff
je 0x404218
push dword [ebp - 0x19c]
call dword [sym.imp.WS2_32.dll_closesocket]
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp - 0x1a4], esi
je 0x40423c
cmp dword [ebp - 0x1a4], 0xffffffff
je 0x40423c
push esi
push dword [ebp - 0x1a4]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteTimerQueueTimer]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1a8]
pop edi
xor ecx, ebp
pop esi
call fcn.0040a6e5
leave
ret