Function at 0x180165a04
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
dec bl
push rsi
jmp 0x180165a1f
push rdi
cmp ax, r11w
test esi, 0x1747414a
shr bx, cl
push r12
push r13
btr ebx, r11d
push r14
push r15
mov rbp, rsp
btc r15w, si
sub rsp, 0x78
rcr r14w, 0x72
xor edi, edi
sar r14w, 0x54
mov r14d, r8d
bsf r15w, r12w
bt si, 0xaf
jmp 0x180165a63
movsxd r15, ecx
mov rbx, r9
ror si, cl
bsf si, di
cmp r15b, dil
mov rsi, rdx
stc
test r8d, r8d
jmp 0x180165a7f
je 0x18016600c
test rdx, rdx
jne 0x180165aed
mov byte [r9 + 0x38], 1
xor r8d, r8d
cmp r13d, 0x4a4b7a66
mov dword [r9 + 0x34], edi
sub edx, edx
mov byte [r9 + 0x30], 1
cmp dl, bpl
stc
jmp 0x180165ab1
sub ecx, ecx
cmp dil, r12b
test r14w, 0x7e68
mov dword [r9 + 0x2c], 0x16
sub r9d, r9d
jmp 0x180165acc
mov qword [rsp + 0x28], rbx
jmp 0x180165ad6
mov qword [rsp + 0x20], rdi
jmp 0x180165ae0
call fcn.180157cac
or eax, 0xffffffff
jmp 0x180166015
mov rax, r15
add ecx, r10d
lea rcx, [0x180096a40]
shl r12w, cl
shr r12b, cl
test bh, 0xd2
and eax, 0x3f
movsx r13w, al
inc r13b
movsxd r12, r11d
mov r12, r15
bswap r13w
sbb r13b, 0xdf
btc r13d, 0x97
sar r12, 6
setbe r13b
mov qword [rbp - 0x18], r12
lea r13, [rax + rax*8]
mov rcx, qword [rcx + r12*8]
mov al, r13b
mov al, byte [rcx + r13*8 + 0x39]
mov byte [rbp - 0x48], al
jmp 0x180165b46
dec al
test r8w, 0x1405
test r11b, r13b
cmp al, 1
jmp 0x180165b58
ja 0x180165b71
mov eax, r14d
clc
not eax
test al, 1
jmp 0x180165b6b
je 0x180165a8e
test byte [rcx + r13*8 + 0x38], 0x20
jmp 0x180165b7c
je 0x180165bae
xor edx, edx
movsx ecx, si
movzx rcx, sp
xchg r8b, r8b
mov ecx, r15d
movzx r8d, r9w
movsx r8d, r8w
mov r8, 0x663004fb
lea r8d, [rdx + 2]
jmp 0x180165ba9
call fcn.1800a45f1
mov ecx, r15d
mov qword [rbp - 0x30], rdi
call fcn.18016624e
lea rdx, [0x180096a40]
test eax, eax
jmp 0x180165bc8
je 0x180165dcb
mov rax, qword [rdx + r12*8]
test bpl, 0xfa
cmp r8b, 0x6a
cmp byte [rax + r13*8 + 0x38], dil
jmp 0x180165be4
jge 0x180165dcb
cmp byte [rbx + 0x28], dil
jne 0x180165c0b
mov rcx, rbx
jmp 0x180165bfc
call fcn.18015a2de
lea rdx, [0x180096a40]
add ah, 0xab
mov rax, qword [rbx + 0x18]
clc
stc
cmp qword [rax + 0x138], rdi
jne 0x180165c31
mov rax, qword [rdx + r12*8]
cmp spl, cl
clc
cmp byte [rax + r13*8 + 0x39], dil
je 0x180165dcb
mov rcx, qword [rdx + r12*8]
movsx edx, r9w
lea rdx, [rbp - 0x20]
jmp 0x180165c42
mov rcx, qword [rcx + r13*8 + 0x28]
jmp 0x180165c4c
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x180165dc4
movsx ecx, byte [rbp - 0x48]
clc
test ecx, ecx
jmp 0x180165c66
je 0x180165d70
sub ecx, 1
jmp 0x180165c74
je 0x180165c88
cmp ecx, 1
jmp 0x180165c82
jne 0x180165f2e
lea r12, [rsi + r14]
mov qword [rbp - 0x40], rdi
sal r15b, cl
mov r15, rsi
clc
cmc
test spl, 0x84
cmp rsi, r12
jmp 0x180165ca4
jae 0x180165d62
mov r14d, dword [rbp - 0x3c]
cwde
lahf
movzx eax, word [r15]
movzx ecx, ax
jmp 0x180165cbc
mov word [rbp - 0x48], ax
jmp 0x180165cc5
call fcn.180166881
movzx ecx, word [rbp - 0x48]
cmc
cmp ax, cx
jmp 0x180165cd7
jne 0x180165d4c
add r14d, 2
test r14, 0x32881032
cmp r12b, al
mov dword [rbp - 0x3c], r14d
cmp cx, 0xa
jne 0x180165d2b
mov ecx, 0xd
jmp 0x180165d03
call fcn.180166881
mov ecx, 0xd
test ebp, r8d
cmp ax, cx
jne 0x180165d4c
inc r14d
mov dword [rbp - 0x3c], r14d
jmp 0x180165d25
inc edi
cmp dil, bpl
stc
add r15, 2
test r8b, 0x15
cmc
cmp bx, 0x120
cmp r15, r12
jmp 0x180165d41
jae 0x180165d62
jmp 0x180165cb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x40], eax
cmove r12w, cx
movsxd r12, ebx
movzx r12w, r14b
mov r12, qword [rbp - 0x18]
jmp 0x180165d6b
jmp 0x180165f15
mov r9d, r14d
movzx rcx, bx
movsx rcx, r14w
cwd
mov qword [rsp + 0x20], rbx
movzx ecx, di
mov r8, rsi
setnp ch
lea rcx, [rbp - 0x40]
movzx dx, sil
cdq
movzx rdx, r14w
mov edx, r15d
jmp 0x180165da1
call fcn.1801646f2
movsd xmm0, qword [rax]
setb dil
movzx di, sil
movzx edi, r12w
mov edi, dword [rax + 8]
jmp 0x180165dbf
jmp 0x180165f22
lea rdx, [0x180096a40]
mov rcx, qword [rdx + r12*8]
cmp r10, 0xb1742b0
jmp 0x180165ddb
cmp byte [rcx + r13*8 + 0x38], dil
jmp 0x180165de5
jge 0x180165eab
movsx ecx, byte [rbp - 0x48]
cmp r13d, esp
cmc
test ecx, ecx
jmp 0x180165dfa
je 0x180165e6e
sub ecx, 1
jmp 0x180165e08
je 0x180165e47
cmp ecx, 1
jmp 0x180165e16
jne 0x180165f3a
mov r9d, r14d
lea rcx, [rbp - 0x40]
mov r8b, cl
not r8w
mov r8, rsi
xchg dx, dx
jmp 0x180165e35
mov edx, r15d
jmp 0x180165e3d
call fcn.18016520f
jmp 0x180165da6
mov r9d, r14d
movsx cx, dh
xchg r8b, dl
lea rcx, [rbp - 0x40]
not r8b
mov r8, rsi
movsx dx, dh
bswap edx
mov edx, r15d
call fcn.180165469
jmp 0x180165da6
mov r9d, r14d
bswap rcx
movsx r8, r15w
movzx cx, r12b
lea rcx, [rbp - 0x40]
jmp 0x180165e8d
mov r8, rsi
movsxd rdx, r13d
mov dx, r9w
xchg dl, dh
mov edx, r15d
jmp 0x180165ea1
call fcn.180164fd8
jmp 0x180165da6
mov rcx, qword [rcx + r13*8 + 0x28]
rcr rdx, 0x70
test dl, r11b
btr r9d, 0xfb
lea r9, [rbp - 0x3c]
sub eax, eax
cmc
bts r8d, r14d
adc dl, bpl
mov r8d, r14d
mov dh, 0x40
and qword [rsp + 0x20], rax
mov dl, r12b
mov rdx, rsi
mov qword [rbp - 0x40], rax
jmp 0x180165ee4
mov dword [rbp - 0x38], eax
jmp 0x180165eec
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jmp 0x180165ef9
jne 0x180165f0d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp - 0x40], eax
btr edx, eax
ror dl, cl
mov edi, dword [rbp - 0x38]
xchg al, dl
test bl, 0x28
movsd xmm0, qword [rbp - 0x40]
cmp r12w, 0x401e
dec eax
movsd qword [rbp - 0x30], xmm0
cqo
bts eax, edx
shr al, cl
lea rdx, [0x180096a40]
shr ah, cl
btc eax, ecx
mov rax, qword [rbp - 0x30]
test ax, di
shr rax, 0x20
test eax, eax
jmp 0x180165f4c
jne 0x180165ff8
mov eax, dword [rbp - 0x30]
cmp r13b, spl
cmp ch, 0xef
cmc
test eax, eax
jmp 0x180165f63
je 0x180165fa9
cmp eax, 5
jne 0x180165f98
mov byte [rbx + 0x30], 1
jmp 0x180165f7b
mov dword [rbx + 0x2c], 9
jmp 0x180165f87
mov byte [rbx + 0x38], 1
jmp 0x180165f90
mov dword [rbx + 0x34], eax
jmp 0x180165ae5
mov ecx, dword [rbp - 0x30]
cdq
mov rdx, rbx
call fcn.18015b69e
jmp 0x180165ae5
mov rax, qword [rdx + r12*8]
cmc
test spl, 0xb8
test byte [rax + r13*8 + 0x38], 0x40
jmp 0x180165fbd
je 0x180165fd1
cmp byte [rsi], 0x1a
jmp 0x180165fcb
je 0x18016600c
and dword [rbx + 0x34], 0
jmp 0x180165fda
mov byte [rbx + 0x30], 1
jmp 0x180165fe3
mov dword [rbx + 0x2c], 0x1c
jmp 0x180165fef
mov byte [rbx + 0x38], 1
jmp 0x180165ae5
mov eax, dword [rbp - 0x2c]
cmp bp, 0x62af
sub eax, edi
jmp 0x180166007
jmp 0x180166015
sub eax, eax
rcl r13d, cl
sub r13b, 0xf1
add rsp, 0x78
pop r15
movzx r14, r9w
pop r14
movzx r12w, r15b
pop r13
movzx edi, sp
movsx rdi, r13w
pop r12
bswap si
movsx di, bl
movzx si, bpl
pop rdi
movsx rbp, r11w
pop rsi
movsx bx, ch
pop rbx
mov bpl, 0x9a
movzx ebp, r10w
pop rbp
jmp 0x180166055
ret