Function at 0x140021090
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x498]
sub rsp, 0x598
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov rax, qword [0x14005b740]
xor rax, rsp
mov qword [rbp + 0x480], rax
mov r15, r9
mov r13, r8
movsxd r12, edx
test rcx, rcx
je 0x14002158c
cmp dword [rcx], 0
jne 0x14002158c
add rcx, 0x10
lea rdx, str.params
call fcn.14000dcf0
mov rcx, rax
test rax, rax
je 0x14002158c
cmp dword [rax], 1
jne 0x14002158c
mov rdx, qword [rax + 0x18]
cmp edx, 2
jl 0x14002158c
xor r9d, r9d
test rdx, rdx
je 0x140021133
mov rax, qword [rax + 0x20]
mov r8, qword [rax]
test r8, r8
je 0x140021133
cmp dword [r8], 2
jne 0x140021133
mov r14, qword [r8 + 0x10]
jmp 0x140021136
mov r14, r9
cmp rdx, 1
jb 0x140021156
jbe 0x140021156
mov rax, qword [rcx + 0x20]
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140021156
cmp dword [rcx], 2
jne 0x140021156
mov rcx, qword [rcx + 0x10]
jmp 0x140021159
mov rcx, r9
test r14, r14
je 0x14002158c
test rcx, rcx
je 0x14002158c
or rdi, 0xffffffffffffffff
mov rax, rdi
inc rax
cmp byte [rcx + rax], r9b
jne 0x140021172
cdq
sub eax, edx
sar eax, 1
movsxd rsi, eax
call fcn.140020fd0
mov rbx, rax
mov r8d, 0x12c
lea rdx, [rbp + 0x350]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rax, [rbp + 0x350]
mov rcx, rdi
nop word [rax + rax]
inc rcx
cmp byte [rax + rcx], 0
jne 0x1400211b0
movsxd rax, ecx
test ecx, ecx
jle 0x1400211d4
cmp byte [rbp + rax + 0x350], 0x5c
je 0x1400211d4
dec ecx
dec rax
test rax, rax
jg 0x1400211c0
lea eax, [rcx + 1]
movsxd rcx, eax
cmp rcx, 0x12c
jae 0x140021586
mov byte [rbp + rcx + 0x350], 0
lea rcx, [rbp + 0x350]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140021200
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r14 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140021210
xor eax, eax
mov qword [rbp + 0x338], rax
mov dword [rbp + 0x330], eax
mov word [rsp + 0x30], ax
lea rax, [rbp + 0x350]
mov qword [rsp + 0x20], rax
mov byte [rbp + 0x340], 0
xor eax, eax
mov dword [rbp + 0x341], eax
mov byte [rbp + 0x345], al
lea rcx, [rbp + 0x340]
dec rcx
nop
lea rcx, [rcx + 1]
cmp byte [rcx], al
jne 0x140021260
movzx eax, word [0x140050c54]
mov word [rcx], ax
lea rcx, [rbp + 0x340]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140021280
movzx eax, word [0x140051cb8]
mov word [rcx], ax
lea rcx, [rbp + 0x340]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x1400212a0
movzx eax, word [0x140054a24]
mov word [rcx], ax
lea rdx, [rbp + 0x340]
lea rcx, [rbp + 0x350]
call fcn.14002cb68
mov qword [rbp + 0x338], rax
test rax, rax
je 0x1400212f7
xor r9d, r9d
mov r8d, 0x200
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
call fcn.140031054
mov ecx, 2
mov dword [rbp + 0x330], ecx
jmp 0x140021350
call fcn.14002d584
cmp dword [rax], 0
je 0x14002134a
lea r9, [rbp + 0x350]
lea r8, str.Cannot_create_file__s_n
mov edx, 3
xor ecx, ecx
call fcn.1400056c0
mov rcx, rbx
call fcn.14002b484
nop
mov rcx, qword [rbp + 0x338]
test rcx, rcx
je 0x14002159d
call fcn.14002dd78
mov rcx, qword [rbp + 0x338]
call fcn.14002ce10
jmp 0x14002159d
mov ecx, dword [rbp + 0x330]
mov rax, qword [rbp + 0x338]
test rax, rax
je 0x1400213b4
shr ecx, 1
test cl, 1
je 0x14002138d
mov r8, rsi
mov r9, rax
mov edx, 1
mov rcx, rbx
call fcn.14002cd04
cmp eax, esi
je 0x140021386
mov rcx, qword [rbp + 0x338]
call fcn.14002eaec
mov rax, qword [rbp + 0x338]
test rax, rax
je 0x1400213b4
mov rcx, rax
call fcn.14002dd78
mov rcx, qword [rbp + 0x338]
call fcn.14002ce10
xor eax, eax
mov qword [rbp + 0x338], rax
mov word [rsp + 0x30], ax
mov rcx, rbx
call fcn.14002b484
mov r8, r14
lea rdx, str.Remote_management:_file__s_was_downloaded_n
xor ecx, ecx
call fcn.1400054d0
call fcn.14000fa30
mov rbx, rax
mov rcx, r12
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 0x14002145b
lea rsi, [0x14005d038]
test rbx, rbx
je 0x14002143d
cmp dword [rbx], 0
jne 0x14002143d
cmp rbx, rsi
je 0x14002143d
mov r8, qword [rbx + 0x38]
lea rax, [r8 + 1]
mov qword [rbx + 0x38], rax
lea rcx, [rbx + 0x10]
mov r9, rsi
lea rdx, str.error
call fcn.14000db70
test eax, eax
je 0x140021480
mov rax, qword [0x14005d040]
cmp rax, 0xffffffffffffffff
je 0x140021480
dec rax
mov qword [0x14005d040], rax
jne 0x140021480
mov rcx, rsi
jmp 0x14002147b
mov rax, qword [0x14005d040]
cmp rax, 0xffffffffffffffff
je 0x140021480
dec rax
mov qword [0x14005d040], rax
jne 0x140021480
lea rcx, [0x14005d038]
call fcn.14000ffb0
mov edx, 6
lea rcx, str.result
call fcn.14000f980
test eax, eax
je 0x1400214ec
lea rsi, [0x14005d048]
test rbx, rbx
je 0x1400214ce
cmp dword [rbx], 0
jne 0x1400214ce
cmp rbx, rsi
je 0x1400214ce
mov r8, qword [rbx + 0x38]
lea rax, [r8 + 1]
mov qword [rbx + 0x38], rax
lea rcx, [rbx + 0x10]
mov r9, rsi
lea rdx, str.result
call fcn.14000db70
test eax, eax
je 0x140021511
mov rax, qword [0x14005d050]
cmp rax, 0xffffffffffffffff
je 0x140021511
dec rax
mov qword [0x14005d050], rax
jne 0x140021511
mov rcx, rsi
jmp 0x14002150c
mov rax, qword [0x14005d050]
cmp rax, 0xffffffffffffffff
je 0x140021511
dec rax
mov qword [0x14005d050], rax
jne 0x140021511
lea rcx, [0x14005d048]
call fcn.14000ffb0
mov rcx, rbx
call fcn.14000d550
mov rsi, rax
nop dword [rax]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140021520
movsxd r8, edi
movsxd rcx, dword [r15]
add rcx, r13
mov rdx, rax
call fcn.14002afa0
add dword [r15], edi
test rbx, rbx
je 0x14002155d
mov rax, qword [rbx + 8]
cmp rax, 0xffffffffffffffff
je 0x14002155d
dec rax
mov qword [rbx + 8], rax
jne 0x14002155d
mov rcx, rbx
call fcn.14000ffb0
mov rcx, rsi
call fcn.14002b484
lea rdx, str.epools.txt
mov rcx, r14
call fcn.140033330
test eax, eax
jne 0x140021324
call fcn.140016080
jmp 0x140021324
call fcn.14002ba2c
int3
lea rdx, str.srv:_wrong_miner_file:params_format_n
mov ecx, 2
call fcn.1400054d0
mov rcx, qword [rbp + 0x480]
xor rcx, rsp
call fcn.14002aed0
add rsp, 0x598
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret