Function at 0x40f040
Capabilities:
Get socket status
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa2c
mov eax, dword [0x5e8e00]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xa1c], ecx
mov dword [ebp - 0xa04], 0
mov byte [ebp - 0x808], 0
push 0x7ff
push 0
lea eax, [ebp - 0x807]
push eax
call fcn.0055b7e0
add esp, 0xc
mov byte [ebp - 0x998], 0
push 0x7f
push 0
lea ecx, [ebp - 0x997]
push ecx
call fcn.0055b7e0
add esp, 0xc
mov byte [ebp - 0xa00], 0
push 0x63
push 0
lea edx, [ebp - 0x9ff]
push edx
call fcn.0055b7e0
add esp, 0xc
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [eax + 0x4c]
add ecx, 1
mov edx, dword [ebp - 0xa1c]
mov dword [edx + 0x4c], ecx
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [eax + 0x4c]
push ecx
push str.session_dcontent_Ver_:_1.1_
push 0x80
lea edx, [ebp - 0x998]
push edx
call fcn.00558154
add esp, 0x10
lea eax, [ebp - 0xa00]
push eax
lea ecx, [ebp - 0x998]
push ecx
call fcn.0044f6b0
add esp, 8
lea edx, [ebp - 0xa00]
push edx
call fcn.005762ec
add esp, 4
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [eax + 0x4c]
push ecx
lea edx, [ebp - 0xa00]
push edx
mov eax, dword [ebp - 0xa1c]
add eax, 0xc
push eax
mov ecx, dword [ebp - 0xa1c]
mov edx, dword [ecx + 0x4c]
push edx
push str.SEARCH__HDS_1.1_r_nCSeq:_d_r_nClient_ID:_s_r_nAccept_Type:text_HDP_r_nContent_Length:13_r_nX_Content_Checksum:_s_r_nX_Session_Id:_d_r_n_r_n_Ver_:_1.1__r_n
push 0x800
lea eax, [ebp - 0x808]
push eax
call fcn.00558154
add esp, 0x1c
xor ecx, ecx
mov dword [ebp - 0xa14], ecx
mov dword [ebp - 0xa10], ecx
mov dword [ebp - 0xa0c], ecx
mov dword [ebp - 0xa08], ecx
mov edx, 2
mov word [ebp - 0xa14], dx
push 0x1f42
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0xa12], ax
push 0x5bb43c
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0xa10], eax
mov dword [ebp - 0x910], 0
mov dword [ebp - 0x918], 0
mov dword [ebp - 0x914], 0x14
mov dword [ebp - 0xa18], 0
jmp 0x40f1d1
mov eax, dword [ebp - 0xa18]
add eax, 1
mov dword [ebp - 0xa18], eax
mov ecx, dword [ebp - 0xa18]
cmp ecx, dword [ebp - 0x910]
jae 0x40f1fd
mov edx, dword [ebp - 0xa1c]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0xa18]
mov edx, dword [ebp + ecx*4 - 0x90c]
cmp edx, dword [eax]
jne 0x40f1fb
jmp 0x40f1fd
jmp 0x40f1c2
mov eax, dword [ebp - 0xa18]
cmp eax, dword [ebp - 0x910]
jne 0x40f23b
cmp dword [ebp - 0x910], 0x40
jae 0x40f23b
mov ecx, dword [ebp - 0xa1c]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0xa18]
mov ecx, dword [edx]
mov dword [ebp + eax*4 - 0x90c], ecx
mov edx, dword [ebp - 0x910]
add edx, 1
mov dword [ebp - 0x910], edx
xor eax, eax
jne 0x40f1b6
lea ecx, [ebp - 0x918]
push ecx
push 0
lea edx, [ebp - 0x910]
push edx
push 0
push 0
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0xa04], eax
cmp dword [ebp - 0xa04], 0
jne 0x40f276
or eax, 0xffffffff
jmp 0x40f322
cmp dword [ebp - 0xa04], 0xffffffff
jne 0x40f287
or eax, 0xffffffff
jmp 0x40f322
lea eax, [ebp - 0x910]
push eax
mov ecx, dword [ebp - 0xa1c]
mov edx, dword [ecx + 4]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll___WSAFDIsSet]
test eax, eax
je 0x40f320
lea ecx, [ebp - 0x808]
mov dword [ebp - 0xa20], ecx
mov edx, dword [ebp - 0xa20]
add edx, 1
mov dword [ebp - 0xa24], edx
mov eax, dword [ebp - 0xa20]
mov cl, byte [eax]
mov byte [ebp - 0xa25], cl
add dword [ebp - 0xa20], 1
cmp byte [ebp - 0xa25], 0
jne 0x40f2bf
mov edx, dword [ebp - 0xa20]
sub edx, dword [ebp - 0xa24]
mov dword [ebp - 0xa2c], edx
push 0x10
lea eax, [ebp - 0xa14]
push eax
push 0
mov ecx, dword [ebp - 0xa2c]
push ecx
lea edx, [ebp - 0x808]
push edx
mov eax, dword [ebp - 0xa1c]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll_sendto]
mov dword [ebp - 0xa04], eax
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055509d
mov esp, ebp
pop ebp
ret