Function at 0x40b1f5
Capabilities:
Create tcp socket
Create udp socket
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket
Send http request

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x14c0
call fcn.00419cb0
mov eax, dword [0x427c60]
xor eax, ebp
mov dword [ebp + 0x143c], eax
push ebx
push esi
push edi
mov esi, ecx
call fcn.0040ab0c
test al, al
je 0x40b50c
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push eax
mov ecx, esi
mov dword [ebp - 0x50], eax
call fcn.00409292
test al, al
je 0x40b50c
lea ecx, [ebp + 0x218]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
call fcn.0041066d
add eax, 8
push eax
lea ecx, [ebp + 0x218]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
push str.bugreport.zip
lea ecx, [ebp + 0x218]
call dword [0x41c22c]
cmp dword [ebp + 0x230], 8
mov eax, dword [ebp + 0x21c]
jae 0x40b28c
lea eax, [ebp + 0x21c]
push 0x41dd54
push eax
call dword [sym.imp.MSVCR90.dll__wfopen]
pop ecx
pop ecx
mov dword [ebp - 0x44], eax
test eax, eax
je 0x40b500
cmp dword [ebp + 0x230], 8
mov eax, dword [ebp + 0x21c]
jae 0x40b2ba
lea eax, [ebp + 0x21c]
lea ecx, [ebp - 0x80]
push ecx
push eax
call dword [sym.imp.MSVCR90.dll__wstat64i32]
pop ecx
pop ecx
call fcn.0041066d
mov ecx, eax
call fcn.00410045
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x3c], eax
mov ebx, 0x3fffffff
test eax, eax
je 0x40b2ed
push eax
call edi
inc eax
cmp eax, ebx
jle 0x40b2f3
and dword [ebp - 0x4c], 0
jmp 0x40b30e
lea esi, [eax + eax]
mov eax, esi
call fcn.00419c40
mov eax, esp
push 3
push esi
push dword [ebp - 0x3c]
push eax
call fcn.00401153
mov dword [ebp - 0x4c], eax
call fcn.0041066d
mov ecx, eax
add ecx, 0x28
call fcn.00406aaf
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x40b32c
push eax
call edi
inc eax
cmp eax, ebx
jle 0x40b332
and dword [ebp - 0x48], 0
jmp 0x40b34d
lea esi, [eax + eax]
mov eax, esi
call fcn.00419c40
mov eax, esp
push 3
push esi
push dword [ebp - 0x3c]
push eax
call fcn.00401153
mov dword [ebp - 0x48], eax
call fcn.0041066d
mov ecx, eax
call fcn.00410638
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x40b368
push eax
call edi
inc eax
cmp eax, ebx
jle 0x40b36e
and dword [ebp - 0x40], 0
jmp 0x40b389
lea esi, [eax + eax]
mov eax, esi
call fcn.00419c40
mov eax, esp
push 3
push esi
push dword [ebp - 0x3c]
push eax
call fcn.00401153
mov dword [ebp - 0x40], eax
call fcn.0041066d
mov ecx, eax
call fcn.00410610
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x40b3a4
push eax
call edi
inc eax
cmp eax, ebx
jle 0x40b3a8
xor eax, eax
jmp 0x40b3c0
lea esi, [eax + eax]
mov eax, esi
call fcn.00419c40
mov eax, esp
push 3
push esi
push dword [ebp - 0x3c]
push eax
call fcn.00401153
push dword [ebp - 0x4c]
push dword [ebp - 0x48]
push dword [ebp - 0x40]
push eax
lea eax, [ebp + 0x1234]
push str.http:__bugreport.xunlei.com_cgi_bin_bugreport.fcgi_appname_sappversion_sexceptcode_speerid_s
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0x18
lea ecx, [ebp + 0xe4]
call fcn.00409bf4
push 1
lea eax, [ebp + 0x1234]
push eax
lea ecx, [ebp + 0xe4]
call fcn.0040a0a3
mov eax, dword [ebp - 0x6c]
push str.application_zip
lea ecx, [ebp + 0x12c]
mov dword [ebp + 0x128], eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
mov esi, 0x1000
push esi
lea eax, [ebp + 0x234]
push eax
lea ecx, [ebp + 0xe4]
call fcn.00408ce4
mov edi, dword [sym.imp.WS2_32.dll_send]
push 0
push eax
lea eax, [ebp + 0x234]
push eax
push dword [ebp - 0x50]
call edi
mov ebx, 0x400
push dword [ebp - 0x44]
lea eax, [ebp + 0x234]
push ebx
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0x40], eax
test eax, eax
jbe 0x40b476
push 0
push eax
lea eax, [ebp + 0x234]
push eax
push dword [ebp - 0x50]
call edi
cmp dword [ebp - 0x40], ebx
je 0x40b44a
push dword [ebp - 0x44]
call dword [sym.imp.MSVCR90.dll_fclose]
push esi
lea eax, [ebp + 0x234]
push 0
push eax
call sub.MSVCR90.dll_memset
mov edi, dword [ebp - 0x50]
add esp, 0x10
push 0
push esi
lea eax, [ebp + 0x234]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0x20
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
jge 0x40b4b8
push edi
call esi
lea ecx, [ebp - 0x38]
call fcn.00409d0b
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp + 0x234]
push eax
lea ecx, [ebp - 0x38]
call fcn.00409d67
test eax, eax
je 0x40b4da
push edi
call esi
push edi
call esi
lea ecx, [ebp - 0x38]
call fcn.00408f72
lea ecx, [ebp + 0xe4]
call fcn.00409c74
lea ecx, [ebp + 0x218]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov al, 1
jmp 0x40b50e
lea ecx, [ebp + 0x218]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor al, al
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x143c]
xor ecx, ebp
call fcn.00419ad8
add ebp, 0x1440
leave
ret