Function at 0x40b113
Capabilities:
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
push ebp
mov eax, 0x1494
lea ebp, [esp - 0x1414]
call fcn.0040f600
mov eax, dword [0x416180]
push ebx
push esi
push edi
xor eax, ebp
push 0
mov dword [ebp + 0x1410], eax
mov eax, dword [ebp + 0x141c]
push 1
push 2
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x80], eax
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x70]
push eax
mov dword [ebp - 0x74], eax
call fcn.0040916a
test al, al
je 0x40b40e
call dword [0x416040]
mov dword [ebp - 0x68], eax
call fcn.0040e18e
mov ecx, eax
call fcn.0040e052
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
jne 0x40b188
and dword [ebp - 0x78], 0
jmp 0x40b1ac
push ebx
call esi
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.0040f600
mov eax, esp
push dword [ebp - 0x68]
push edi
push ebx
push eax
call fcn.004010e9
mov dword [ebp - 0x78], eax
call fcn.0040e18e
mov ecx, eax
add ecx, 0x28
call fcn.00406df7
mov ebx, eax
test ebx, ebx
jne 0x40b1c6
and dword [ebp - 0x7c], eax
jmp 0x40b1ea
push ebx
call esi
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.0040f600
mov eax, esp
push dword [ebp - 0x68]
push edi
push ebx
push eax
call fcn.004010e9
mov dword [ebp - 0x7c], eax
call fcn.0040e18e
mov ecx, eax
call fcn.0040e15f
mov ebx, eax
test ebx, ebx
jne 0x40b201
and dword [ebp - 0x6c], eax
jmp 0x40b225
push ebx
call esi
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.0040f600
mov eax, esp
push dword [ebp - 0x68]
push edi
push ebx
push eax
call fcn.004010e9
mov dword [ebp - 0x6c], eax
call fcn.0040e18e
mov ecx, eax
call fcn.0040e137
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x40b23d
xor esi, esi
jmp 0x40b260
push edi
call esi
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and eax, 0xfffffffc
call fcn.0040f600
mov eax, esp
push dword [ebp - 0x68]
push esi
push edi
push eax
call fcn.004010e9
mov esi, eax
call fcn.0040e18e
mov ecx, eax
call fcn.0040e187
push eax
call fcn.0040e18e
mov ecx, eax
add ecx, 0x28
call fcn.00401342
push dword [eax + 0x90]
call fcn.0040e18e
mov ecx, eax
call fcn.0040e066
push eax
push dword [ebp - 0x78]
lea eax, [ebp + 0x1208]
push dword [ebp - 0x7c]
push dword [ebp - 0x6c]
push esi
push str.http:__bugreport.xunlei.com_cgi_bin_bugreport.fcgi_appname_sappversion_sexceptcode_speerid_sworkstate_dstarttime_dcrashtime_d
push eax
call dword [sym.imp.MSVCR71.dll_sprintf]
add esp, 0x24
lea ecx, [ebp + 0xb8]
call fcn.004095dc
push ebx
lea eax, [ebp + 0x1208]
push eax
lea ecx, [ebp + 0xb8]
call fcn.00409aac
mov esi, 0x1000
push esi
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp + 0xb8]
call fcn.00408bc2
mov edi, dword [ebp - 0x74]
push ebx
push eax
lea eax, [ebp + 0x208]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
push esi
lea eax, [ebp + 0x208]
push ebx
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
push ebx
push esi
lea eax, [ebp + 0x208]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0x20
jge 0x40b32d
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor bl, bl
jmp 0x40b3ff
lea ecx, [ebp - 0x64]
call fcn.0040978b
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x64]
call fcn.004097e7
test eax, eax
je 0x40b35a
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor bl, bl
jmp 0x40b3f7
mov edi, dword [ebp - 0x70]
add edi, 4
mov ecx, edi
call fcn.0040aad0
lea ecx, [ebp + 0x1ec]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov eax, dword [ebp - 0x6c]
sub esi, eax
test esi, esi
lea ebx, [ebp + eax + 0x208]
jle 0x40b3c5
xor eax, eax
mov al, byte [ebx]
cmp al, 0xa
je 0x40b39e
cmp al, 0xd
je 0x40b39e
push eax
lea ecx, [ebp + 0x1ec]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::push_back_char_]
jmp 0x40b3c1
cmp dword [ebp + 0x200], 0
jbe 0x40b3b5
lea eax, [ebp + 0x1ec]
push eax
mov ecx, edi
call fcn.0040ab71
lea ecx, [ebp + 0x1ec]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::clear_void_]
inc ebx
dec esi
jne 0x40b383
push dword [ebp - 0x74]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, edi
call fcn.0040922d
mov ecx, dword [ebp - 0x80]
cmp eax, 1
sbb eax, eax
neg eax
mov dword [ecx], eax
mov ecx, dword [ebp - 0x70]
call fcn.0040ac1d
lea ecx, [ebp + 0x1ec]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov bl, 1
lea ecx, [ebp - 0x64]
call fcn.00408e50
lea ecx, [ebp + 0xb8]
call fcn.0040965c
mov al, bl
jmp 0x40b410
xor al, al
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1410]
xor ecx, ebp
call fcn.0040f50d
add ebp, 0x1414
leave
ret 4