Function at 0x140028c20
Capabilities:
Set console window title

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x40
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x88], rbx
mov rsi, rcx
mov ecx, reloc.WS2_32.dll_WSASetLastError
call fcn.140343424
mov rbx, rax
mov qword [rsp + 0x78], rax
lea rax, vtable.xmrig::Api.0
mov qword [rbx], rax
mov qword [rbx + 8], rsi
xor eax, eax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
mov qword [rbx + 0x28], rax
call fcn.14034176c
mov rcx, rax
movabs rax, 0x346dc5d63886594b
imul rcx
sar rdx, 0xb
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [rbx + 0x30], rdx
xor r15d, r15d
mov qword [rbx + 0x38], r15
mov qword [rbx + 0x40], r15
mov qword [rbx + 0x48], r15
mov qword [rbx + 0x50], r15
mov qword [rbx + 0x58], r15
mov qword [rbx + 0x60], r15
mov byte [rbx + 0x68], r15b
mov qword [rsp + 0x70], rbx
mov rcx, qword [rsi + 0x10]
add rcx, 0x10
mov rdx, qword [rcx + 8]
cmp qword [rcx + 0x10], rdx
je 0x140028cd9
mov qword [rdx], rbx
add qword [rcx + 8], 8
jmp 0x140028ce3
lea r8, [rsp + 0x70]
call fcn.1400281c0
mov rax, qword [rsi + 0x10]
mov rdx, qword [rax + 8]
add rdx, 0x78
mov rcx, rbx
call fcn.14018b5c0
nop
mov rax, qword [rsi + 0x10]
mov qword [rax], rbx
lea r8, [rsi + 8]
mov qword [rsp + 0x70], r8
mov rax, qword [rsi + 0x10]
mov rcx, qword [rax]
add rcx, 0x40
mov rdx, qword [rcx + 8]
cmp qword [rcx + 0x10], rdx
je 0x140028d27
mov qword [rdx], r8
add qword [rcx + 8], 8
jmp 0x140028d31
lea r8, [rsp + 0x70]
call fcn.1400281c0
mov rax, qword [rsi + 0x10]
mov rcx, qword [rax + 8]
mov rcx, qword [rcx + 0xb8]
call fcn.14002e2d0
mov rax, qword [rsi + 0x10]
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140028d5c
cmp byte [rcx + 9], 0
je 0x140028d5c
mov al, 1
jmp 0x140028d5e
xor al, al
test al, al
je 0x140028d6e
mov byte [0x140536c04], 1
jmp 0x140028f04
mov ecx, 0x18
call fcn.140343424
mov rbx, rax
mov qword [rsp + 0x80], rax
mov rcx, qword [rsi + 0x10]
mov rbp, qword [rcx + 8]
lea rax, vtable.xmrig::ConsoleLog.0
mov qword [rbx], rax
mov qword [rbx + 8], r15
mov qword [rbx + 0x10], r15
mov ecx, 1
call fcn.1403656a8
mov rdi, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
sub eax, 1
je 0x140028dc2
sub eax, 1
je 0x140028dd3
sub eax, 1
je 0x140028de5
xor al, al
test al, al
jne 0x140028de9
mov byte [0x1405272b8], al
jmp 0x140028ec8
lea rdx, [rsp + 0x78]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140028dc2
mov al, 1
jmp 0x140028dc4
mov ecx, 0x158
call fcn.140343424
mov qword [rbx + 8], rax
mov rdi, qword [0x14053c330]
test rdi, rdi
jne 0x140028e22
lea rdi, [0x14053c340]
mov rcx, rdi
call fcn.14019b120
test eax, eax
je 0x140028e1b
mov rdi, r15
jmp 0x140028e22
mov qword [0x14053c330], rdi
mov r8d, 1
mov rdx, qword [rbx + 8]
mov rcx, rdi
call fcn.14018cb80
test eax, eax
jns 0x140028e44
mov byte [0x1405272b8], 0
jmp 0x140028ec8
xor edx, edx
mov rcx, qword [rbx + 8]
call fcn.14018d120
mov rax, qword [rbx + 8]
mov qword [rbx + 0x10], rax
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140028e9a
mov dword [rsp + 0x70], r15d
lea rdx, [rsp + 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140028e9a
mov edx, dword [rsp + 0x70]
and edx, 0xffffffbf
mov dword [rsp + 0x70], edx
bts edx, 7
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
cmp byte [rbp + 0xc8], 0
je 0x140028ec8
lea rdx, [rsp + 0x28]
lea rcx, [rbp + 0xc8]
call fcn.14002d120
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov rcx, qword [rsp + 0x28]
call fcn.140343460
nop
mov rcx, qword [0x140536c08]
test rcx, rcx
je 0x140028f04
mov qword [rsp + 0x80], rbx
add rcx, 0x4050
mov rdx, qword [rcx + 8]
cmp qword [rcx + 0x10], rdx
je 0x140028ef7
mov qword [rdx], rbx
add qword [rcx + 8], 8
jmp 0x140028f04
lea r8, [rsp + 0x80]
call fcn.1400281c0
mov rax, qword [rsi + 0x10]
mov rcx, qword [rax + 8]
cmp qword [rcx + 0xa8], 0
je 0x140028fb8
mov ecx, 0x138
call fcn.140343424
mov r14, rax
mov qword [rsp + 0x70], rax
mov rcx, qword [rsi + 0x10]
mov rdx, qword [rcx + 8]
mov rdi, qword [rdx + 0xa8]
lea rax, vtable.xmrig::FileLog.0
mov qword [r14], rax
lea rbx, [r14 + 8]
mov qword [rsp + 0x78], rbx
mov word [rbx], 0xa0d
mov byte [rbx + 2], 0
mov dword [rbx + 4], 0xffffffff
mov qword [rbx + 8], r15
mov qword [rbx + 0x38], r15
mov qword [rbx + 0x40], r15
mov qword [rbx + 0x48], r15
mov rcx, rbx
call fcn.140027750
mov rdx, rdi
mov rcx, rbx
call fcn.140027820
nop
mov rcx, qword [0x140536c08]
test rcx, rcx
je 0x140028fb8
mov qword [rsp + 0x70], r14
add rcx, 0x4050
mov rdx, qword [rcx + 8]
cmp qword [rcx + 0x10], rdx
je 0x140028fae
mov qword [rdx], r14
add qword [rcx + 8], 8
jmp 0x140028fb8
lea r8, [rsp + 0x70]
call fcn.1400281c0
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret