Function at 0x408441
Capabilities:
Get socket status
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x238c
call fcn.0040ec80
sub esp, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x5c], 1
mov dword [ebp - 0x40], 0x42449c
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461d08
mov eax, dword [eax]
lea edx, [ebp - 0x5c]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x4084a2
mov eax, 1
jmp 0x408a0b
mov dword [ebp - 0x2264], 0
mov dword [ebp - 0x2368], 0
mov dword [ebp - 0x2c], 0
jmp 0x4084e1
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp + eax*4 - 0x2260]
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461d08
mov eax, dword [eax]
cmp edx, eax
je 0x4084ec
add dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x2264]
cmp dword [ebp - 0x2c], eax
jb 0x4084bf
mov eax, dword [ebp - 0x2264]
cmp dword [ebp - 0x2c], eax
jne 0x40852b
mov eax, dword [ebp - 0x2264]
cmp eax, 0x3f
ja 0x40852b
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461d08
mov edx, dword [eax]
mov eax, dword [ebp - 0x2c]
mov dword [ebp + eax*4 - 0x2260], edx
mov eax, dword [ebp - 0x2264]
add eax, 1
mov dword [ebp - 0x2264], eax
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461d08
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2368]
lea edx, [ebp - 0x2264]
mov ecx, 0x41
mov edi, eax
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x1c]
lea edx, [eax + 1]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x2368]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [sym.imp.WS2_32.dll_select]
call eax
sub esp, 0x14
cmp eax, 0xffffffff
je 0x4089d4
mov dword [ebp - 0x20], 0
jmp 0x4089c3
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x2368]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x4089bf
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461d08
mov edx, dword [eax]
mov eax, dword [ebp - 0x20]
cmp edx, eax
jne 0x408689
mov dword [ebp - 0x58], 0x10
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461d08
mov eax, dword [eax]
lea edx, [ebp - 0x58]
mov dword [esp + 8], edx
lea edx, [ebp - 0x54]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_accept]
call eax
sub esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
je 0x4089be
mov dword [ebp - 0x30], 0
jmp 0x408635
mov eax, dword [ebp - 0x30]
mov eax, dword [ebp + eax*4 - 0x2260]
cmp dword [ebp - 0x44], eax
je 0x408640
add dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x2264]
cmp dword [ebp - 0x30], eax
jb 0x408622
mov eax, dword [ebp - 0x2264]
cmp dword [ebp - 0x30], eax
jne 0x408672
mov eax, dword [ebp - 0x2264]
cmp eax, 0x3f
ja 0x408672
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x44]
mov dword [ebp + eax*4 - 0x2260], edx
mov eax, dword [ebp - 0x2264]
add eax, 1
mov dword [ebp - 0x2264], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x44]
jae 0x4089bf
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x1c], eax
jmp 0x4089bf
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0
lea eax, [ebp - 0x105c]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0
lea eax, [ebp - 0x205c]
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1000
lea edx, [ebp - 0x105c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
test eax, eax
jg 0x408770
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov dword [ebp - 0x34], 0
jmp 0x408760
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp + eax*4 - 0x2260]
mov eax, dword [ebp - 0x20]
cmp edx, eax
jne 0x40875c
jmp 0x40873a
mov eax, dword [ebp - 0x34]
add eax, 1
mov edx, dword [ebp + eax*4 - 0x2260]
mov eax, dword [ebp - 0x34]
mov dword [ebp + eax*4 - 0x2260], edx
add dword [ebp - 0x34], 1
mov eax, dword [ebp - 0x2264]
sub eax, 1
cmp dword [ebp - 0x34], eax
jb 0x40871f
mov eax, dword [ebp - 0x2264]
sub eax, 1
mov dword [ebp - 0x2264], eax
jmp 0x4089bf
add dword [ebp - 0x34], 1
mov eax, dword [ebp - 0x2264]
cmp dword [ebp - 0x34], eax
jb 0x40870c
jmp 0x4089bf
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0
lea eax, [ebp - 0x2160]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
jmp 0x4089a3
lea edx, [ebp - 0x105c]
mov eax, dword [ebp - 0x24]
add eax, edx
movzx eax, byte [eax]
lea ecx, [ebp - 0x205c]
mov edx, dword [ebp - 0x28]
add edx, ecx
mov byte [edx], al
lea edx, [ebp - 0x105c]
mov eax, dword [ebp - 0x24]
add eax, edx
movzx eax, byte [eax]
cmp al, 0xa
jne 0x40899b
mov dword [esp + 4], str.GET
lea eax, [ebp - 0x205c]
mov dword [esp], eax
call sym._strstr
test eax, eax
je 0x408852
lea eax, [ebp - 0x205c]
mov dword [esp], eax
call sym._strlen
cmp eax, 5
jbe 0x408852
mov dword [esp + 4], str.GET
lea eax, [ebp - 0x205c]
mov dword [esp], eax
call sym._strstr
mov dword [esp + 4], 0x20
mov dword [esp], eax
call sym._strchr
mov dword [esp + 4], 0x421520
mov dword [esp], eax
call sym._strtok
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2160]
mov dword [esp], eax
call sym._strcpy
jmp 0x408976
mov dword [esp + 4], 0x424e36
lea eax, [ebp - 0x205c]
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x408976
mov dword [ebp - 0x38], 0
jmp 0x4088ca
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp + eax*4 - 0x2260]
mov eax, dword [ebp - 0x20]
cmp edx, eax
jne 0x4088c6
jmp 0x4088a7
mov eax, dword [ebp - 0x38]
add eax, 1
mov edx, dword [ebp + eax*4 - 0x2260]
mov eax, dword [ebp - 0x38]
mov dword [ebp + eax*4 - 0x2260], edx
add dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x2264]
sub eax, 1
cmp dword [ebp - 0x38], eax
jb 0x40888c
mov eax, dword [ebp - 0x2264]
sub eax, 1
mov dword [ebp - 0x2264], eax
jmp 0x4088d5
add dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x2264]
cmp dword [ebp - 0x38], eax
jb 0x408879
lea eax, [ebp - 0x2160]
mov dword [esp], eax
call sym._strlen
mov ebx, eax
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x110
add eax, 0x461c00
mov dword [esp], eax
call sym._strlen
add eax, ebx
cmp eax, 0x103
ja 0x408964
mov dword [ebp - 0x236c], 0
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x236c]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x110
lea ecx, [eax + 0x461c00]
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x2160]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._Check_Requestedfile
jmp 0x4089bf
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
jmp 0x4089bf
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0
lea eax, [ebp - 0x205c]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x28], 0xffffffff
add dword [ebp - 0x24], 1
add dword [ebp - 0x28], 1
lea eax, [ebp - 0x105c]
mov dword [esp], eax
call sym._strlen
mov edx, dword [ebp - 0x24]
cmp edx, eax
jb 0x4087a1
jmp 0x4089bf
nop
add dword [ebp - 0x20], 1
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jle 0x40859f
jmp 0x40853e
nop
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461d08
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x318
add eax, 0x461cfc
mov dword [eax], 0
mov eax, 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4