Function at 0x140022230
Capabilities:
Get file size
Read and send data from client to server
Read file via mapping
Send data
Send http request

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov qword [r11 - 0x48], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov rax, qword [0x140076088]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rdi, rcx
mov dword [rsp + 0x48], 1
cmp r8d, 2
je 0x1400224fe
cmp r8d, 5
mov r8, rdx
je 0x14002237f
mov dword [rsp + 0x48], 0x84c01000
xor ebx, ebx
mov qword [r11 - 0x50], rbx
mov dword [rsp + 0x30], 0x84c01000
mov qword [r11 - 0x60], rbx
lea rax, [0x1400673a8]
mov qword [r11 - 0x68], rax
xor r9d, r9d
lea rdx, [0x140054af0]
mov rcx, qword [rcx + 0x71ab0]
call qword [sym.imp.WININET.dll_HttpOpenRequestW]
mov qword [rdi + 0x71ab8], rax
test rax, rax
jne 0x1400222d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
jmp 0x140022505
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x4c], 4
lea r9, [rsp + 0x4c]
lea r8, [rsp + 0x48]
mov edx, 0x1f
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetQueryOptionW]
test eax, eax
jne 0x14002230e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
jmp 0x140022505
or dword [rsp + 0x48], 0x80
mov r9d, 4
lea r8, [rsp + 0x48]
lea edx, [r9 + 0x1b]
mov rcx, qword [rdi + 0x71ab8]
call qword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
jne 0x140022347
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
jmp 0x140022505
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rdi + 0x71ab8]
call qword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x140022375
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
jmp 0x140022505
mov ebx, 1
jmp 0x140022505
mov eax, 0x4c00040
mov ecx, 0x4400040
cmp dword [rdi + 0x71ad0], 0x1bb
cmovne eax, ecx
xor ebx, ebx
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, str.HTTP_1.0
lea rdx, [0x140054b90]
mov rcx, qword [rdi + 0x71ab0]
call qword [sym.imp.WININET.dll_HttpOpenRequestW]
mov qword [rdi + 0x71ab8], rax
test rax, rax
jne 0x1400223e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
jmp 0x140022505
mov rcx, qword [rdi + 8]
cmp dword [rcx + 0xa00], 2
je 0x1400223fc
mov esi, ebx
test ebx, ebx
setne bl
jmp 0x140022505
add rcx, 0x200
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r15, rax
test rax, rax
jne 0x140022468
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
mov esi, ebx
test ebx, ebx
setne bl
jmp 0x140022505
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r14, rax
test rax, rax
jne 0x14002249d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
mov esi, ebx
test ebx, ebx
setne bl
jmp 0x140022505
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [rsp + 0x20], eax
mov r9, r14
xor r8d, r8d
xor edx, edx
mov rcx, qword [rdi + 0x71ab8]
call qword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x1400224dc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x71ac0], eax
mov esi, ebx
test ebx, ebx
setne bl
jmp 0x140022505
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
setne bl
jmp 0x140022505
call fcn.140022540
mov ebx, eax
mov dword [rsp + 0x48], ebx
mov eax, ebx
jmp 0x140022511
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140025e90
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret