Function at 0x408940
Capabilities:
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40adfb
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x40e018]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
jmp 0x408982
jmp 0x408994
jmp 0x4089a6
push 0x10000000
pop dword [0x4d9be4]
jmp 0x4089bf
cmp dword [0x4d9be4], 0x10000000
je 0x408a31
xor eax, eax
mov dword [0x40b2d0], eax
mov dword [0x40b2d4], eax
mov dword [0x40b2d8], eax
mov dword [str.Rwu__], eax
mov dword [0x40b2e0], eax
mov dword [0x40b2e4], eax
mov dword [0x40b2e8], eax
mov dword [0x40b2ec], eax
mov dword [0x40b2f0], eax
mov dword [0x40b2f4], eax
mov dword [str.p_H:], eax
mov dword [0x40b2fc], eax
mov dword [0x40b300], eax
mov dword [0x40b304], eax
mov dword [0x40b308], eax
mov dword [0x40b30c], eax
mov dword [0x40b310], eax
mov dword [str.r_], eax
mov dword [0x40b318], eax
mov dword [0x40b31c], eax
lea eax, [ebp - 0x244]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x408a4c
call fcn.00408ce0
push 0x50
push 0x48
push 0x40e480
mov ecx, ebx
call fcn.00409130
push eax
mov ecx, ebx
call fcn.004086e0
test al, al
jne 0x408a7e
mov ecx, dword [ebx + 4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 4], 0xffffffff
call fcn.00408ce0
mov edx, dword [ebp + 8]
push edx
mov ecx, ebx
call fcn.00408800
test al, al
jne 0x408aa3
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 4], 0xffffffff
call fcn.00408ce0
test byte [0x4d9be0], 1
jne 0x408ad0
mov ecx, dword [ebx + 4]
or dword [0x4d9be0], 1
push 0
push 0x200
push 0x4d99e0
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [0x4d99d8], eax
jmp 0x408ad5
mov eax, dword [0x4d99d8]
cmp eax, 0xb4
jle 0x408c47
cmp eax, 0x200
jae 0x408c47
lea edx, [ebp - 0x24c]
push edx
push 0x40c3b4
push 0x4d99e0
mov dword [ebp - 0x250], 0
call dword [sym.imp.MSVCR100.dll_strtok_s]
add esp, 0xc
test eax, eax
je 0x408bb8
mov esi, 0xfffffffe
inc dword [ebp - 0x250]
inc esi
mov dword [ebp - 0x254], esi
cmp esi, 4
ja case.default.0x408b2e
jmp dword [esi*4 + 0x408cc4]
push eax
push 0x20
push 0x4106dc
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
jmp case.default.0x408b2e
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov byte [ebx + 0x3f], al
jmp case.default.0x408b2e
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov byte [ebx + 0x40], al
jmp case.default.0x408b2e
mov ecx, dword [eax]
mov dword [ebx + 0x35], ecx
mov edx, dword [eax + 4]
mov dword [ebx + 0x39], edx
mov ax, word [eax + 8]
mov word [ebx + 0x3d], ax
jmp case.default.0x408b2e
mov ecx, 0x20
mov esi, eax
lea edi, [ebp - 0x94]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x254]
lea ecx, [ebp - 0x24c]
push ecx
push 0x40c3b4
push 0
call dword [sym.imp.MSVCR100.dll_strtok_s]
add esp, 0xc
test eax, eax
jne 0x408b1c
cmp dword [ebp - 0x250], 6
je 0x408bce
mov edx, dword [ebx + 4]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 4], 0xffffffff
call fcn.00408ce0
lea edi, [ebx + 8]
mov dword [ebp - 0x254], edi
call fcn.00409f40
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x250], esp
call fcn.00401dc0
lea eax, [ebp - 0xb0]
push eax
call fcn.004017f0
add esp, 0x20
mov edi, eax
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], 0
call fcn.00409280
lea esi, [ebp - 0xb0]
mov byte [ebp - 0x245], al
call fcn.00401e00
cmp byte [ebp - 0x245], 0
jne 0x408a68
cmp byte [ebx + 0x40], 1
je 0x408c3c
mov edx, dword [ebx + 4]
push edx
jmp 0x408a6c
mov ecx, ebx
call fcn.00408590
test al, al
jne 0x408c50
mov eax, dword [ebx + 4]
push eax
jmp 0x408a6c
push 0
mov ecx, ebx
call fcn.00408d50
mov ecx, dword [ebx + 4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0x254]
push 0x2d
push 0
push edx
mov dword [ebx + 4], 0xffffffff
call sub.MSVCR100.dll_memset
add esp, 0xc
jmp 0x408c8f
jmp 0x408ca6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040a125
mov esp, ebp
pop ebp
ret 4