Function at 0x140021950
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4b8]
sub rsp, 0x5b8
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x14005b740]
xor rax, rsp
mov qword [rbp + 0x4a0], rax
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x20], edx
test rcx, rcx
je 0x140021e20
cmp dword [rcx], 0
jne 0x140021e20
add rcx, 0x10
lea rdx, str.params
call fcn.14000dcf0
test rax, rax
je 0x140021e20
cmp dword [rax], 1
jne 0x140021e20
mov rcx, qword [rax + 0x18]
cmp ecx, 1
jl 0x140021e20
xor r14d, r14d
test rcx, rcx
je 0x1400219f4
mov rax, qword [rax + 0x20]
mov rcx, qword [rax]
test rcx, rcx
je 0x1400219f4
cmp dword [rcx], 2
jne 0x1400219f4
mov r15, qword [rcx + 0x10]
jmp 0x1400219f7
mov r15, r14
mov r8d, 0x12c
lea rdx, [rbp + 0x370]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [rbp + 0x370]
or rsi, 0xffffffffffffffff
mov rax, rsi
nop word [rax + rax]
inc rax
cmp byte [rcx + rax], r14b
jne 0x140021a20
movsxd rcx, eax
test eax, eax
jle 0x140021a44
cmp byte [rbp + rcx + 0x370], 0x5c
je 0x140021a44
dec eax
dec rcx
test rcx, rcx
jg 0x140021a30
inc eax
movsxd rcx, eax
cmp rcx, 0x12c
jae 0x140021e1a
mov byte [rbp + rcx + 0x370], r14b
lea rcx, [rbp + 0x370]
dec rcx
nop dword [rax + rax]
lea rcx, [rcx + 1]
cmp byte [rcx], r14b
jne 0x140021a70
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r15 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140021a80
mov qword [rbp + 0x358], r14
mov dword [rbp + 0x350], r14d
mov word [rsp + 0x50], r14w
lea rax, [rbp + 0x370]
mov qword [rsp + 0x38], rax
mov byte [rbp + 0x360], 0
xor eax, eax
mov dword [rbp + 0x361], eax
mov byte [rbp + 0x365], al
lea rcx, [rbp + 0x360]
dec rcx
nop
lea rcx, [rcx + 1]
cmp byte [rcx], al
jne 0x140021ad0
movzx eax, word [0x140054a20]
mov word [rcx], ax
lea rcx, [rbp + 0x360]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140021af0
movzx eax, word [0x140054a24]
mov word [rcx], ax
lea rdx, [rbp + 0x360]
lea rcx, [rbp + 0x370]
call fcn.14002cb68
mov qword [rbp + 0x358], rax
test rax, rax
je 0x140021b46
xor r9d, r9d
mov r8d, 0x200
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x50]
call fcn.140031054
mov dword [rbp + 0x350], 1
jmp 0x140021b91
call fcn.14002d584
cmp dword [rax], 0
je 0x140021b91
lea r9, [rbp + 0x370]
lea r8, str.Cannot_open_file__s_n
mov edx, 3
xor ecx, ecx
call fcn.1400056c0
nop
mov rcx, qword [rbp + 0x358]
test rcx, rcx
je 0x140021e31
call fcn.14002dd78
mov rcx, qword [rbp + 0x358]
call fcn.14002ce10
jmp 0x140021e31
mov rbx, qword [rbp + 0x358]
test rbx, rbx
jne 0x140021ba2
mov rdi, r14
jmp 0x140021c08
mov rcx, rbx
call fcn.14002fd54
mov edi, eax
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, qword [rbp + 0x358]
call fcn.140030a58
mov rcx, qword [rbp + 0x358]
call fcn.14002fd54
movsxd rbx, eax
xor r8d, r8d
mov edx, edi
mov rcx, qword [rbp + 0x358]
call fcn.140030a58
mov rdi, rbx
cmp ebx, 0x4000
jle 0x140021c01
lea r8, str.too_big_file_n
mov edx, 3
xor ecx, ecx
call fcn.1400056c0
jmp 0x140021b6b
mov rbx, qword [rbp + 0x358]
movsxd r12, edi
mov rcx, r12
call fcn.14002b4c4
mov r13, rax
test rbx, rbx
je 0x140021c84
test byte [rbp + 0x350], 1
je 0x140021c5e
mov r9, rbx
mov r8, r12
mov edx, 1
mov rcx, rax
call fcn.14002e0c4
cmp eax, edi
je 0x140021c57
mov rcx, qword [rbp + 0x358]
call fcn.14002eac4
test eax, eax
jne 0x140021c57
mov rcx, qword [rbp + 0x358]
call fcn.14002eaec
mov rbx, qword [rbp + 0x358]
test rbx, rbx
je 0x140021c84
mov rcx, rbx
call fcn.14002dd78
mov rcx, qword [rbp + 0x358]
call fcn.14002ce10
mov qword [rbp + 0x358], r14
mov word [rsp + 0x50], r14w
mov edx, edi
mov rcx, r13
call fcn.1400218c0
mov r12, rax
mov rcx, r13
call fcn.14002b484
call fcn.14000fa30
mov rbx, rax
movsxd rcx, dword [rsp + 0x20]
call fcn.14000ff10
mov r8, rax
lea rdx, [0x140053974]
mov rcx, rbx
call fcn.14000fb20
mov edx, 5
lea rcx, str.error
call fcn.14000f980
test eax, eax
je 0x140021d29
lea rdi, [0x14005d038]
test rbx, rbx
je 0x140021d0b
cmp dword [rbx], 0
jne 0x140021d0b
cmp rbx, rdi
je 0x140021d0b
mov r8, qword [rbx + 0x38]
lea rax, [r8 + 1]
mov qword [rbx + 0x38], rax
lea rcx, [rbx + 0x10]
mov r9, rdi
lea rdx, str.error
call fcn.14000db70
test eax, eax
je 0x140021d4e
mov rax, qword [0x14005d040]
cmp rax, 0xffffffffffffffff
je 0x140021d4e
dec rax
mov qword [0x14005d040], rax
jne 0x140021d4e
mov rcx, rdi
jmp 0x140021d49
mov rax, qword [0x14005d040]
cmp rax, 0xffffffffffffffff
je 0x140021d4e
dec rax
mov qword [0x14005d040], rax
jne 0x140021d4e
lea rcx, [0x14005d038]
call fcn.14000ffb0
call fcn.14000fbb0
mov rdi, rax
mov r8, rax
lea rdx, str.result
mov rcx, rbx
call fcn.14000fb20
test r15, r15
jne 0x140021d72
mov rax, r14
jmp 0x140021d7a
mov rcx, r15
call fcn.14000fec0
mov rdx, rax
mov rcx, rdi
call fcn.14000fd50
test r12, r12
je 0x140021d95
mov rcx, r12
call fcn.14000fec0
mov r14, rax
mov rdx, r14
mov rcx, rdi
call fcn.14000fd50
mov rcx, rbx
call fcn.14000d550
mov rdi, rax
nop dword [rax + rax]
inc rsi
cmp byte [rax + rsi], 0
jne 0x140021db0
movsxd r8, esi
mov r14, qword [rsp + 0x28]
movsxd rcx, dword [r14]
add rcx, qword [rsp + 0x30]
mov rdx, rax
call fcn.14002afa0
add dword [r14], esi
test rbx, rbx
je 0x140021df4
mov rax, qword [rbx + 8]
cmp rax, 0xffffffffffffffff
je 0x140021df4
dec rax
mov qword [rbx + 8], rax
jne 0x140021df4
mov rcx, rbx
call fcn.14000ffb0
mov rcx, rdi
call fcn.14002b484
mov rcx, r12
call fcn.14002b484
mov r8, r15
lea rdx, str.Remote_management:_file__s_was_uploaded_n
xor ecx, ecx
call fcn.1400054d0
jmp 0x140021b6b
call fcn.14002ba2c
int3
lea rdx, str.srv:_wrong_miner_getfile:params_format_n
mov ecx, 2
call fcn.1400054d0
mov rcx, qword [rbp + 0x4a0]
xor rcx, rsp
call fcn.14002aed0
add rsp, 0x5b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret