Function at 0x40b6f8
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov eax, 0x1494
lea ebp, [esp - 0x1414]
call fcn.00417340
mov eax, dword [0x423694]
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.00409209
test al, al
je 0x40b9fb
call dword [0x423040]
mov dword [ebp - 0x68], eax
call fcn.0040e916
mov ecx, eax
call fcn.0040e7da
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
test ebx, ebx
jne 0x40b76d
and dword [ebp - 0x78], 0
jmp 0x40b791
push ebx
call esi
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.00417340
mov eax, esp
push dword [ebp - 0x68]
push edi
push ebx
push eax
call fcn.004010e9
mov dword [ebp - 0x78], eax
call fcn.0040e916
mov ecx, eax
add ecx, 0x28
call fcn.00406e10
mov ebx, eax
test ebx, ebx
jne 0x40b7ab
and dword [ebp - 0x7c], eax
jmp 0x40b7cf
push ebx
call esi
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.00417340
mov eax, esp
push dword [ebp - 0x68]
push edi
push ebx
push eax
call fcn.004010e9
mov dword [ebp - 0x7c], eax
call fcn.0040e916
mov ecx, eax
call fcn.0040e8e7
mov ebx, eax
test ebx, ebx
jne 0x40b7e6
and dword [ebp - 0x6c], eax
jmp 0x40b80a
push ebx
call esi
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.00417340
mov eax, esp
push dword [ebp - 0x68]
push edi
push ebx
push eax
call fcn.004010e9
mov dword [ebp - 0x6c], eax
call fcn.0040e916
mov ecx, eax
call fcn.0040e8bf
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x40b822
xor esi, esi
jmp 0x40b845
push edi
call esi
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and eax, 0xfffffffc
call fcn.00417340
mov eax, esp
push dword [ebp - 0x68]
push esi
push edi
push eax
call fcn.004010e9
mov esi, eax
call fcn.0040e916
mov ecx, eax
call fcn.0040e90f
push eax
call fcn.0040e916
mov ecx, eax
add ecx, 0x28
call fcn.0040133a
push dword [eax + 0x90]
call fcn.0040e916
mov ecx, eax
call fcn.0040e7ee
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.00409940
push ebx
lea eax, [ebp + 0x1208]
push eax
lea ecx, [ebp + 0xb8]
call fcn.00409eba
mov esi, 0x1000
push esi
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp + 0xb8]
call fcn.00408c61
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 0x40b912
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor bl, bl
jmp 0x40b9ec
lea ecx, [ebp - 0x64]
call fcn.00409aef
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x64]
call fcn.00409b4b
test eax, eax
je 0x40b93f
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor bl, bl
jmp 0x40b9e4
mov edi, dword [ebp - 0x70]
add edi, 8
mov ecx, edi
call fcn.0040a94e
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 0x40b9aa
xor eax, eax
mov al, byte [ebx]
cmp al, 0xa
je 0x40b983
cmp al, 0xd
je 0x40b983
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 0x40b9a6
cmp dword [ebp + 0x200], 0
jbe 0x40b99a
lea eax, [ebp + 0x1ec]
push eax
mov ecx, edi
call fcn.0040af30
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 0x40b968
push dword [ebp - 0x74]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, edi
call fcn.0040950b
mov ecx, dword [ebp - 0x80]
cmp eax, 1
sbb eax, eax
neg eax
mov dword [ecx], eax
mov ecx, dword [ebp - 0x70]
call fcn.0040b219
mov ecx, dword [ebp - 0x70]
call fcn.004092cc
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.00408eef
lea ecx, [ebp + 0xb8]
call fcn.004099c0
mov al, bl
jmp 0x40b9fd
xor al, al
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1410]
xor ecx, ebp
call fcn.00417249
add ebp, 0x1414
leave
ret 4