Function at 0x14000ed90
Capabilities:
Delete file
Read http header
Receive http response
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb8]
sub rsp, 0x1b8
mov rax, qword [0x14010a010]
xor rax, rsp
mov qword [rbp + 0xa0], rax
mov qword [rsp + 0x70], r9
mov r13, r8
mov r12, rdx
mov rsi, rcx
mov qword [rsp + 0x50], rdx
mov rax, qword [rbp + 0x120]
mov qword [rsp + 0x68], rax
lea rdi, [rcx + 0x70]
mov qword [rbp - 0x78], rdi
test rdi, rdi
je 0x14000edf9
cmp dword [rdi + 0x28], 0
je 0x14000edf9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
xor edx, edx
mov r8d, 0xf8
lea rcx, [rbp - 0x60]
call fcn.14008d590
lea rcx, [rbp - 0x60]
call fcn.140012100
nop
xor eax, eax
mov dword [rsp + 0x60], eax
mov r14d, eax
mov dword [rbp - 0x80], eax
mov dword [rsp + 0x40], eax
mov r15d, 0x4000
mov dword [rbp - 0x68], eax
mov ebx, eax
mov qword [rbp - 0x70], rax
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x14000ee48
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor eax, eax
mov qword [rsi + 0x38], rax
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x14000ee5d
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor eax, eax
mov qword [rsi + 0x30], rax
mov rcx, qword [rsi + 0x28]
test rcx, rcx
je 0x14000ee72
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor eax, eax
mov qword [rsi + 0x28], rax
mov qword [rsi + 0x60], 0x11
mov byte [rsi + 0x68], 0
lea rcx, [rbp - 0x60]
call fcn.140012e90
mov dword [rsi + 0x60], 0x11
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea r9, [rbp - 0x60]
mov rdx, r13
mov rcx, rsi
call fcn.14000f360
test al, al
jne 0x14000eebd
lea rdx, [rbp - 0x60]
mov rcx, r12
call fcn.14000ec40
nop
jmp 0x14000f310
lea rdx, [rbp - 0x58]
mov rcx, rsi
call fcn.14000f790
test al, al
je 0x14000ef0e
lea rcx, [rbp - 0x60]
call fcn.140012480
lea rcx, [rbp + 0x20]
cmp qword [rbp + 0x38], 8
cmovae rcx, qword [rbp + 0x20]
cmp qword [rbp + 0x30], 3
jne 0x14000ef5c
mov r8d, 3
lea rdx, [0x1400d94b8]
movzx eax, word [rdx]
cmp word [rcx], ax
jne 0x14000ef5c
add rcx, 2
add rdx, 2
sub r8, 1
jne 0x14000eef8
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x14000ef68
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x64], eax
mov dword [rsi + 0x60], 8
jmp 0x14000f24f
mov dword [rsi + 0x60], 6
jmp 0x14000f24f
xor eax, eax
mov dword [rsp + 0x68], eax
mov r14d, eax
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 5]
mov rcx, qword [rsi + 0x38]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000f246
mov ecx, dword [rsp + 0x68]
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140061008
mov r14, rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x28], 0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9, r14
xor r8d, r8d
lea edx, [r8 + 5]
mov rcx, qword [rsi + 0x38]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov rcx, r14
test eax, eax
je 0x14000f23e
mov qword [rsp + 0x78], 0
mov r8d, 0xa
lea rdx, [rsp + 0x78]
call fcn.14009305c
mov r14d, eax
mov rcx, qword [rsp + 0x50]
call fcn.140061000
test r14d, r14d
je 0x14000f246
xor r9d, r9d
xor r8d, r8d
mov edx, r14d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x14000f057
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x64], eax
mov dword [rsi + 0x60], 8
jmp 0x14000f246
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x14000f042
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x14000f042
lea rdx, [rsp + 0x60]
mov rcx, qword [rsi + 0x38]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x14000f0a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x64], eax
mov dword [rsi + 0x60], 4
jmp 0x14000f246
mov rcx, r15
call fcn.140061008
mov rbx, rax
mov qword [rbp - 0x70], rax
mov r8, r15
xor edx, edx
mov rcx, rax
call fcn.14008d590
mov eax, dword [rsp + 0x60]
xor edi, edi
mov dword [rbp - 0x68], edi
cmp eax, r15d
jbe 0x14000f0ec
mov ecx, eax
call fcn.140061008
mov rcx, rbx
mov rbx, rax
mov qword [rbp - 0x70], rax
test rcx, rcx
je 0x14000f0e7
call fcn.140061000
mov r15d, dword [rsp + 0x60]
test rbx, rbx
je 0x14000f238
mov r8d, r15d
xor edx, edx
mov rcx, rbx
call fcn.14008d590
lea r9, [rbp - 0x80]
mov r8d, dword [rsp + 0x60]
mov rdx, rbx
mov rcx, qword [rsi + 0x38]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x14000f228
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x68]
mov r8d, dword [rbp - 0x80]
mov rdx, rbx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000f212
mov eax, dword [rbp - 0x68]
cmp dword [rbp - 0x80], eax
jne 0x14000f212
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [rsp + 0x40]
add eax, dword [rbp - 0x80]
mov dword [rsp + 0x40], eax
mov r10, qword [rsi + 0x58]
test r10, r10
je 0x14000f186
mov r10, qword [r10]
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
mov r9d, r14d
xor r8d, r8d
mov rdx, qword [rsi + 0x50]
mov rcx, qword [rsi + 0x58]
call qword [r10]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsi + 0x38]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x14000f1f8
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x14000f1b8
mov rbx, qword [rbp - 0x70]
cmp byte [rsi + 0x68], dil
je 0x14000f0c4
mov rdi, qword [rbp - 0x78]
jmp 0x14000f246
mov byte [rbp - 0x60], 1
mov eax, dword [rsp + 0x40]
mov dword [rbp - 0x28], eax
mov dword [rsi + 0x60], edi
mov r10, qword [rsi + 0x58]
test r10, r10
je 0x14000f208
mov r10, qword [r10]
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
mov r9d, r14d
mov r8d, 2
mov rdx, qword [rsi + 0x50]
mov rcx, qword [rsi + 0x58]
call qword [r10]
mov rdi, qword [rbp - 0x78]
mov rbx, qword [rbp - 0x70]
jmp 0x14000f246
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x64], eax
mov dword [rsi + 0x60], 4
mov rdi, qword [rbp - 0x78]
mov rbx, qword [rbp - 0x70]
jmp 0x14000f246
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x64], eax
mov dword [rsi + 0x60], 0x10
mov rdi, qword [rbp - 0x78]
jmp 0x14000f246
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0x64], eax
mov dword [rsi + 0x60], 9
mov rdi, qword [rbp - 0x78]
jmp 0x14000f246
call fcn.140061000
xor r14d, r14d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [rbp - 0x60], 0
je 0x14000f264
cmp byte [rsi + 0x68], 0
jne 0x14000f264
mov r15d, dword [rsi + 0x64]
test r15d, r15d
je 0x14000f2a3
mov r10, qword [rsi + 0x58]
test r10, r10
je 0x14000f294
mov r10, qword [r10]
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], eax
mov r9d, r14d
mov r8d, 1
mov rdx, qword [rsi + 0x50]
mov rcx, qword [rsi + 0x58]
call qword [r10]
mov rdi, qword [rbp - 0x78]
mov rbx, qword [rbp - 0x70]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r15d, dword [rsi + 0x64]
cmp r15d, 0x2ee0
jb 0x14000f2f5
xor esi, esi
mov qword [rsp + 0x70], rsi
lea rcx, str.winhttp.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdx, rax
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x409
mov r8d, r15d
mov ecx, 0xb00
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rdx, [rbp - 0x60]
mov rcx, r12
call fcn.14000ec40
nop
test rbx, rbx
je 0x14000f310
mov rcx, rbx
call fcn.140061000
nop
lea rcx, [rbp - 0x60]
call fcn.140012200
nop
test rdi, rdi
je 0x14000f32e
cmp dword [rdi + 0x28], 0
je 0x14000f32e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, r12
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.140060fe0
add rsp, 0x1b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret