Function at 0x401240
Capabilities:
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408aad
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x5e8
mov eax, dword [0x40d040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x5a8], edx
mov esi, ecx
mov eax, dword [ebx + 8]
push 0
push 0
push 0
mov dword [ebp - 0x5cc], eax
mov eax, dword [ebx + 0xc]
push 1
mov dword [ebp - 0x5d0], eax
mov eax, dword [ebx + 0x10]
push str.Launcher_Tai_Game
mov dword [ebp - 0x5d4], eax
mov dword [ebp - 0x5ac], 0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
mov dword [ebp - 0x5dc], edi
test edi, edi
je 0x4012f3
push 0
push 0x80000000
push 0
push 0
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
mov dword [ebp - 0x5d8], esi
test esi, esi
jne 0x4012fa
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x401aeb
push 0xb0
lea eax, [ebp - 0x5a0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x5a0], 0x40966c
lea ecx, [ebp - 0x538]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x59c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x5a0]
mov dword [ebp - 0x5ac], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x5a0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x5a0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x5a4], eax
lea ecx, [ebp - 0x59c]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0x59c]
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x554], 0
mov byte [ebp - 0x55f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x40d88c]
mov ecx, dword [0x40d890]
mov dword [ebp - 0x550], 0
mov dword [ebp - 0x55c], eax
mov dword [ebp - 0x558], ecx
mov dword [ebp - 0x564], 0
push ecx
push 0x22
push dword [ebp - 0x5a8]
lea ecx, [ebp - 0x59c]
mov byte [ebp - 4], 2
call fcn.00406350
test eax, eax
jne 0x40140b
push eax
mov eax, dword [ebp - 0x5a0]
lea ecx, [ebp - 0x5a0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x5a0]
mov eax, dword [ebp - 0x5a0]
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
test al, al
je 0x401443
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov byte [ebp - 0x5a1], 0
jmp 0x401a9b
push 0
lea eax, [ebp - 0x424]
mov dword [ebp - 0x5b0], 0
push eax
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], 0
push eax
push 0x20000005
push esi
mov dword [ebp - 0x424], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0x640000
push 0
push 0x401
push dword [ebp - 0x5cc]
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [ebp - 0x5a8]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4014a0
sub ecx, esi
push ecx
lea eax, [edx + ecx]
push eax
push edx
lea ecx, [ebp - 0x5c8]
call fcn.004064e0
push eax
mov edx, 0x409370
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x454]
call fcn.00406600
add esp, 4
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x5b4]
cmp ecx, 7
jbe 0x401518
mov edx, dword [ebp - 0x5c8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40150e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40150e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c60
add esp, 8
xor eax, eax
mov dword [ebp - 0x5b8], 0
mov word [ebp - 0x5c8], ax
mov eax, dword [ebp - 0x41c]
push 0x98
push 0
mov dword [ebp - 0x5b4], 7
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x409740]
lea eax, [ebp - 0x4f0]
push eax
mulsd xmm0, qword [0x409728]
movsd qword [ebp - 0x5e8], xmm0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x4f0], 0x409718
lea ecx, [ebp - 0x4a0]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x4ec]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x4f0]
mov dword [ebp - 0x5ac], 3
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::constructor_class_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t_____bool_]
mov dword [ebp - 4], 8
mov eax, dword [ebp - 0x4f0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x4f0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x4f4], eax
lea ecx, [ebp - 0x4ec]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
mov dword [ebp - method.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0x4b4], 0
mov dword [ebp - 0x4b0], 4
push 0
lea eax, [ebp - 0x5c0]
mov byte [ebp - 4], 9
push 0
push eax
call dword [sym.imp.MSVCP140.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setprecision_long_long___int64__]
add esp, 0xc
lea ecx, [ebp - 0x4f0]
mov esi, eax
push 0x401220
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base_____cdecl___class_std::ios_base___]
push dword [esi + 0xc]
mov edi, eax
push dword [esi + 8]
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
add ecx, edi
push ecx
mov ecx, dword [esi]
call ecx
movsd xmm0, qword [ebp - 0x5e8]
add esp, 4
mov ecx, edi
movsd qword [esp], xmm0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___double_]
mov byte [ebp - 4], 0xa
xorps xmm0, xmm0
mov edx, dword [ebp - 0x4b0]
xor eax, eax
movups xmmword [ebp - 0x5c8], xmm0
mov dword [ebp - 0x5b8], 0
mov dword [ebp - 0x5b4], 7
mov word [ebp - 0x5c8], ax
mov dword [ebp - 0x5ac], 0xb
movq qword [ebp - 0x5ec], xmm0
mov dword [ebp - 0x5e4], eax
mov eax, edx
and al, 0x22
cmp al, 2
je 0x4016d5
mov eax, dword [ebp - 0x4cc]
mov ecx, dword [eax]
test ecx, ecx
je 0x4016d5
mov eax, dword [ebp - 0x4dc]
cmp ecx, dword [ebp - 0x4b4]
cmovb ecx, dword [ebp - 0x4b4]
mov edx, dword [eax]
sub ecx, edx
jmp 0x4016fc
test dl, 4
jne 0x401749
mov eax, dword [ebp - 0x4d0]
mov esi, dword [eax]
test esi, esi
je 0x401749
mov eax, dword [ebp - 0x4e0]
mov edx, dword [eax]
mov eax, dword [ebp - 0x4c0]
mov ecx, dword [eax]
add ecx, ecx
sub ecx, edx
add ecx, esi
mov eax, edx
sar ecx, 1
test eax, eax
je 0x401749
cmp ecx, 7
ja 0x40172f
lea esi, [ecx + ecx]
mov dword [ebp - 0x5b8], ecx
push esi
push edx
lea eax, [ebp - 0x5c8]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x5c8], ax
jmp 0x401749
push edx
mov byte [ebp - 0x5a8], 0
push dword [ebp - 0x5a8]
push ecx
lea ecx, [ebp - 0x5c8]
call fcn.00406e20
lea eax, [ebp - 0x5c8]
mov dword [ebp - 4], 0xb
push eax
mov edx, 0x409390
lea ecx, [ebp - 0x5f8]
call fcn.00406600
add esp, 4
push 0x409388
mov edx, eax
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x43c]
call fcn.00406720
add esp, 4
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x5e4]
cmp ecx, 7
jbe 0x4017c3
mov edx, dword [ebp - 0x5f8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4017b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401816
push ecx
push edx
call fcn.00407c60
add esp, 8
xor eax, eax
mov dword [ebp - 0x5e8], 0
mov dword [ebp - 0x5e4], 7
mov word [ebp - 0x5f8], ax
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x5b4]
cmp ecx, 7
jbe 0x401826
mov edx, dword [ebp - 0x5c8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40181c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40181c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c60
add esp, 8
mov esi, dword [sym.imp.USER32.dll_SetWindowTextW]
xor eax, eax
cmp dword [ebp - 0x440], 7
mov word [ebp - 0x5c8], ax
lea eax, [ebp - 0x454]
cmova eax, dword [ebp - 0x454]
push eax
push dword [ebp - 0x5d0]
mov dword [ebp - 0x5b8], 0
mov dword [ebp - 0x5b4], 7
call esi
cmp dword [ebp - 0x428], 7
lea eax, [ebp - 0x43c]
cmova eax, dword [ebp - 0x43c]
push eax
push dword [ebp - 0x5d4]
call esi
mov esi, dword [ebp - 0x5d8]
lea eax, [ebp - 0x420]
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
push eax
push 0x400
lea eax, [ebp - 0x418]
push eax
push esi
call edi
test eax, eax
je 0x401956
nop dword [eax]
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x401956
push 0
push eax
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x5a0]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
mov eax, dword [ebp - 0x5b0]
add eax, dword [ebp - 0x420]
mov dword [ebp - 0x5b0], eax
push 0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x409740]
mov eax, dword [ebp - 0x41c]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x409740]
divsd xmm1, xmm0
mulsd xmm1, qword [0x409730]
cvttsd2si eax, xmm1
push eax
push 0x402
push dword [ebp - 0x5cc]
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x420]
push eax
push 0x400
lea eax, [ebp - 0x418]
push eax
push esi
call edi
test eax, eax
jne 0x4018b0
lea ecx, [ebp - 0x59c]
call fcn.004062c0
test eax, eax
jne 0x40197d
push eax
mov eax, dword [ebp - 0x5a0]
lea ecx, [ebp - 0x5a0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x5dc]
call esi
mov ecx, dword [ebp - 0x428]
mov byte [ebp - 0x5a1], 1
cmp ecx, 7
jbe 0x4019d5
mov edx, dword [ebp - 0x43c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4019cb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401a6e
push ecx
push edx
call fcn.00407c60
add esp, 8
xor eax, eax
mov dword [ebp - 0x42c], 0
mov word [ebp - 0x43c], ax
mov eax, dword [ebp - 0x4f0]
mov dword [ebp - 0x428], 7
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x4f0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x4f4], eax
lea ecx, [ebp - 0x4ec]
call fcn.00405180
lea ecx, [ebp - 0x4e8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x4a0]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
mov ecx, dword [ebp - 0x440]
cmp ecx, 7
jbe 0x401a7e
mov edx, dword [ebp - 0x454]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401a74
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a74
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c60
add esp, 8
xor eax, eax
mov dword [ebp - 0x444], 0
mov dword [ebp - 0x440], 7
mov word [ebp - 0x454], ax
mov eax, dword [ebp - 0x5a0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov ecx, dword [ebp - 0x5a0]
mov edx, dword [ecx + 4]
lea ecx, [edx - 0x68]
mov dword [ebp + edx - 0x5a4], ecx
lea ecx, [ebp - 0x59c]
call fcn.00405ca0
lea ecx, [ebp - 0x598]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x538]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov al, byte [ebp - 0x5a1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00407a22
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret