Function at 0x180161a11
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
rcl ebp, cl
xor bp, si
bts rbp, rsi
push rsi
or bpl, spl
push rdi
add bpl, dl
bsf esi, r12d
sal sil, cl
push r12
sbb r12b, 2
ror sil, cl
mov r12w, si
push r13
add r13w, 0x5ac
push r14
add r12b, 0xa6
bts si, si
push r15
lea rbp, [rax - 0x57]
sub rsp, 0xd0
mov qword [rbp - 9], 0xfffffffffffffffe
movsx si, al
cmc
mov qword [rax + 8], rbx
cwde
mov rax, qword [0x180094010]
test r12, r15
btr r13, 0x54
jmp 0x180161a7f
xor rax, rsp
btc r14d, 0x9b
cmc
shl r14b, 0x8e
mov qword [rbp + 0x17], rax
cmp r15, rsp
cbw
mov rsi, r8
shrd r15w, di, 0xe3
mov qword [rbp - 0x41], r8
movsxd r14, edx
mov rbx, rcx
btc r12w, 0xcb
movzx eax, r8w
sbb r12w, 0x1a1a
mov rax, qword [rbp + 0x7f]
shld r12d, ebx, 0x2f
test r12b, 0xad
xchg cl, r12b
mov qword [rbp - 0x59], rax
mov rax, r14
ror r13w, cl
btr rcx, 0x2e
mov r13, r14
cmc
sar r13, 6
jmp 0x180161ae5
mov qword [rbp - 0x39], r13
rol r15b, 0x8b
btr r15w, 0xf2
lea rcx, [0x180000000]
mov r15b, 0xba
and eax, 0x3f
lea r15, [rax + rax*8]
rol r12d, 5
sub rax, r11
and ah, bl
mov rax, qword [rcx + r13*8 + 0x96a50]
xor r12w, 0x21bb
mov rax, qword [rax + r15*8 + 0x28]
mov qword [rbp - 0x19], rax
jmp 0x180161b31
mov r12d, r9d
add r12, r8
jmp 0x180161b3c
mov qword [rbp - 0x61], r12
jmp 0x180161b45
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [rbp - 0x49], eax
xor edi, edi
cmc
mov r10, qword [rbp - 0x59]
cmp byte [r10 + 0x28], dil
jmp 0x180161b5e
jne 0x180161b7e
mov rcx, r10
jmp 0x180161b6c
call fcn.18015766c
mov r10, qword [rbp - 0x59]
shrd cx, r13w, 0x66
shl rcx, cl
mov rcx, qword [r10 + 0x18]
jmp 0x180161b8e
mov ecx, dword [rcx + 0xc]
mov dword [rbp - 0x45], ecx
xor eax, eax
clc
stc
mov qword [rbx], rax
mov dword [rbx + 8], eax
test r13, 0x39183676
clc
cmp qword [rbp - 0x41], r12
jmp 0x180161baf
jae 0x1801622b5
mov r9, r14
sar r9, 6
ror r12w, 0x62
mov qword [rbp - 0x11], r9
adc r11d, 0x3463382d
mov edx, edi
or r11b, spl
mov al, byte [rsi]
shl r11b, cl
mov r12b, 0x23
neg r11b
mov byte [rbp - 0x71], al
shl r12w, cl
btc r11w, 0x44
mov dword [rbp - 0x6d], edi
bts r12d, r9d
not r12
mov r12d, 1
lea r11, [0x180000000]
cmc
cmp ecx, 0xfde9
jmp 0x180161c0c
jne 0x180161edc
mov edx, edi
movzx ecx, cx
mov r14, rdi
lea rcx, [r15*8 + 0x3e]
add rcx, qword [r11 + r9*8 + 0x96a50]
cmp byte [rcx], dil
jmp 0x180161c32
je 0x180161c60
inc edx
jmp 0x180161c3f
inc r14
inc rcx
cmp rax, 0x53b46792
jmp 0x180161c51
cmp r14, 5
jmp 0x180161c5a
jl 0x180161c2a
test r14, r14
jle 0x180161dfd
mov rax, qword [r11 + r13*8 + 0x96a50]
movzx ecx, byte [rax + r15*8 + 0x3e]
movsx r12d, dx
not ax
movsx r12d, byte [rcx + r11 + 0x948e0]
cmovnp eax, r14d
not r8d
inc r12d
mov eax, r12d
xadd r8b, r8b
cmp r10b, bl
setnp r8b
sub eax, edx
setns r8b
shl r8w, cl
movzx rdx, di
mov dword [rbp - 0x51], eax
sar dx, 0x99
test r13b, 0xce
mov rdx, qword [rbp - 0x61]
sub rdx, rsi
movsxd r8, eax
cmp bx, 0x6f2c
cmp r8, rdx
jmp 0x180161ccf
jg 0x18016218e
mov rcx, rdi
movzx dx, r10b
cwd
lea rdx, [r15*8 + 0x3e]
xadd al, al
sbb al, dil
add rdx, qword [r11 + r9*8 + 0x96a50]
jmp 0x180161cfa
mov al, byte [rdx]
jmp 0x180161d01
mov byte [rbp + rcx - 1], al
inc rcx
jmp 0x180161d0d
inc rdx
cmp rcx, r14
jl 0x180161cfa
test r8, r8
jmp 0x180161d21
jle 0x180161d46
lea rcx, [rbp - 1]
add rcx, r14
mov rdx, rsi
jmp 0x180161d36
call fcn.180153f2a
mov r10, qword [rbp - 0x59]
lea r11, [0x180000000]
mov rdx, rdi
mov rcx, qword [r11 + r13*8 + 0x96a50]
add rcx, rdx
jmp 0x180161d59
mov byte [rcx + r15*8 + 0x3e], dil
inc rdx
cmp dh, 0xf0
test r9w, 0x316c
stc
cmp rdx, r14
jl 0x180161d49
mov qword [rbp - 0x31], rdi
lahf
movsxd rcx, esi
lea rax, [rbp - 1]
test r13w, 0x64bd
mov qword [rbp - 0x29], rax
or dl, r9b
mov eax, edi
btc cx, di
cmp r12d, 4
jmp 0x180161da0
sete al
inc eax
cwd
mov r12d, eax
cmovae r9w, di
mov r8d, eax
cqo
mov qword [rsp + 0x20], r10
lea r9, [rbp - 0x31]
not cl
movsxd rcx, r14d
movzx edx, r15w
lea rdx, [rbp - 0x29]
movsx ecx, bx
lea rcx, [rbp - 0x6d]
jmp 0x180161dd6
call fcn.1801636ca
cmp rax, 0xffffffffffffffff
je 0x1801622b5
mov eax, dword [rbp - 0x51]
bswap ecx
dec eax
movsxd rcx, eax
clc
add rsi, rcx
jmp 0x180161df8
jmp 0x180161feb
movzx eax, byte [rsi]
sbb r8b, 0xb4
shld r13w, r10w, 0xd8
movsx r13, byte [rax + r11 + 0x948e0]
add r8b, r10b
lea ecx, [r13 + 1]
rol eax, cl
lahf
shl ax, 0xea
mov r8, qword [rbp - 0x61]
test r12b, 0x2a
sub r8, rsi
lahf
and ah, 0xcd
test cl, r10b
movsxd rax, ecx
stc
cmc
cmp rax, r8
jmp 0x180161e40
jg 0x1801621fd
mov qword [rbp - 0x51], rdi
add r9b, 0x5a
mov qword [rbp - 0x21], rsi
dec r14w
cwde
rol r14d, 0x72
mov eax, edi
xchg r8w, r9w
dec r8b
cmp ecx, 4
jmp 0x180161e6f
sete al
dec r9w
inc eax
cwd
mov r14d, eax
setle cl
mov r8b, r14b
mov r8d, eax
cdq
mov qword [rsp + 0x20], r10
movsxd rcx, esi
cmovae cx, r11w
setns cl
lea r9, [rbp - 0x51]
lea rdx, [rbp - 0x21]
cmovge cx, r15w
lea rcx, [rbp - 0x6d]
call fcn.1801636ca
cmp rax, 0xffffffffffffffff
jmp 0x180161eb6
je 0x1801622b5
add rsi, r13
mov r12d, r14d
movsx r13, sp
seto r13b
movsx r13d, r11w
mov r13, qword [rbp - 0x39]
jmp 0x180161ed7
jmp 0x180161feb
mov r8, qword [r11 + r13*8 + 0x96a50]
mov cl, byte [r8 + r15*8 + 0x3d]
cmp dil, r9b
test cl, 4
jmp 0x180161ef4
je 0x180161f27
mov al, byte [r8 + r15*8 + 0x3e]
mov byte [rbp + 7], al
sal al, cl
cwd
mov al, byte [rsi]
mov byte [rbp + 8], al
cmc
and cl, 0xfb
mov byte [r8 + r15*8 + 0x3d], cl
mov r8d, 2
movzx edx, r8w
lea rdx, [rbp + 7]
jmp 0x180161fc1
movzx r9d, byte [rsi]
cmc
cmovle rcx, r8
rol ch, cl
mov rax, qword [r10 + 0x18]
rol ch, cl
bsf cx, r15w
not cl
mov rcx, qword [rax]
cmp r9w, 0x4365
cmp word [rcx + r9*2], di
jmp 0x180161f52
jge 0x180161fad
lea r14, [rsi + 1]
cmp r14, qword [rbp - 0x61]
jae 0x18016226a
mov r9, r10
xchg cl, ch
movsx ecx, r13w
movsx r8, r13w
mov r8d, 2
mov rdx, rsi
jmp 0x180161f89
lea rcx, [rbp - 0x6d]
jmp 0x180161f92
call fcn.18015e383
cmp eax, 0xffffffff
jmp 0x180161f9f
je 0x1801622b5
mov rsi, r14
jmp 0x180161feb
mov r8, r12
cwd
jmp 0x180161fb7
mov rdx, rsi
movsx cx, dl
xchg r9b, cl
mov r9, r10
mov rcx, rax
movsx cx, ch
movzx ecx, r15w
lea rcx, [rbp - 0x6d]
jmp 0x180161fd8
call fcn.18015e383
cmp eax, 0xffffffff
jmp 0x180161fe5
je 0x1801622b5
inc rsi
xor r9b, sil
sal r8d, cl
sub eax, 0x3734b88
mov qword [rsp + 0x38], rdi
bswap r9d
ror cl, 0x85
or r9b, bl
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 5
bts ax, r10w
lea rax, [rbp + 0xf]
setg r9b
rcr cl, 0x49
mov qword [rsp + 0x20], rax
cmp r10b, r14b
mov r9d, r12d
shrd r8w, bx, 0x5f
sar r8b, cl
lea r8, [rbp - 0x6d]
xor ch, 0xcb
movsx cx, r14b
sub edx, edx
bswap cx
mov ecx, dword [rbp - 0x49]
jmp 0x180162051
call fcn.18015bcdc
mov r14d, eax
cmp r12b, 0x4e
test eax, eax
jmp 0x180162064
je 0x1801622b5
mov qword [rsp + 0x20], rdi
movzx edx, r10w
cdq
cwd
lea r9, [rbp - 0x69]
mov r8d, eax
cmovnp rcx, rsi
jmp 0x180162086
lea rdx, [rbp + 0xf]
mov cl, r14b
mov r12w, 0x21f2
setge r12b
mov r12, qword [rbp - 0x19]
mov rcx, r12
jmp 0x1801620a2
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1801622aa
mov edx, esi
sub edx, dword [rbp - 0x41]
add edx, dword [rbx + 8]
clc
cmc
cmp r9w, 0x68e2
mov dword [rbx + 4], edx
cmp dword [rbp - 0x69], r14d
jb 0x1801622b5
cmp byte [rbp - 0x71], 0xa
jmp 0x1801620d6
jne 0x18016215e
mov eax, 0xd
mov r9b, r13b
movzx r8, ax
mov word [rbp - 0x71], ax
movzx r9d, r14w
not r9w
movsx r9d, r15w
mov qword [rsp + 0x20], rdi
seto r9b
movzx cx, r13b
jmp 0x18016210b
lea r9, [rbp - 0x69]
bswap rdx
cdq
movsx rdx, bp
lea r8d, [rax - 0xc]
movzx edx, r11w
lea rdx, [rbp - 0x71]
mov rcx, r12
jmp 0x18016212b
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1801622aa
cmp dword [rbp - 0x69], 1
jmp 0x180162142
jb 0x1801622b5
inc dword [rbx + 8]
mov dx, 0x2be6
inc dword [rbx + 4]
movzx dx, al
btc rdx, 0xdf
mov edx, dword [rbx + 4]
cmp rsi, qword [rbp - 0x61]
jmp 0x180162167
jae 0x1801622b5
mov r10, qword [rbp - 0x59]
movzx r9, r11w
cmovno r9d, ebp
mov r9, qword [rbp - 0x11]
movsx cx, dh
mov ecx, dword [rbp - 0x45]
jmp 0x180162189
jmp 0x180161bd1
test rdx, rdx
jmp 0x180162196
jle 0x1801621f0
sub rsi, r14
test r11d, ecx
clc
bt cx, r8w
mov rcx, qword [r11 + r13*8 + 0x96a50]
add rcx, r14
mov al, byte [rsi + r14]
jmp 0x1801621bc
mov byte [rcx + r15*8 + 0x3e], al
movsxd rax, esp
mov eax, 0x10655672
inc edi
movsx ax, r8b
movsxd rax, ecx
movsx rax, bx
inc r14
shld eax, r11d, 0x5d
movsxd rax, edi
cmp rax, rdx
jmp 0x1801621ea
jl 0x1801621a8
add dword [rbx + 4], edx
jmp 0x1801621f8
jmp 0x1801622b5
test r8, r8
jmp 0x180162205
jle 0x180162261
mov rdx, rdi
shrd cx, bx, 0x5f
adc al, 0x6c
mov r9, qword [rbp - 0x39]
xadd ch, ch
sub cl, r9b
mov rcx, qword [r11 + r9*8 + 0x96a50]
sbb al, r10b
add rcx, rdx
not al
mov al, byte [rdx + rsi]
jmp 0x180162237
mov byte [rcx + r15*8 + 0x3e], al
cwde
inc ah
inc edi
inc rdx
bts rax, rbx
btr rax, rsp
movsxd rax, edi
cmp r9d, ecx
cmc
cmp rax, r8
jmp 0x18016225b
jl 0x18016221f
add dword [rbx + 4], r8d
jmp 0x1801622b5
mov byte [r8 + r15*8 + 0x3e], r9b
btc rax, rbx
movsxd rax, ecx
ror al, cl
mov rax, qword [r11 + r13*8 + 0x96a50]
test r8b, 0x90
test bp, r9w
or byte [rax + r15*8 + 0x3d], 4
movzx ax, r13b
cmovae ax, di
setp ah
lea eax, [rdx + 1]
mov dword [rbx + 4], eax
jmp 0x1801622a5
jmp 0x1801622b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx], eax
mov cl, r8b
mov rax, rbx
mov rcx, qword [rbp + 0x17]
cmp r12b, r10b
xor rcx, rsp
jmp 0x1801622c7
call fcn.18014946c
mov rbx, qword [rsp + 0x110]
adc r13b, 0x60
movzx ebp, r8w
or r13, 0x27e1511f
add rsp, 0xd0
movsx di, dil
not r15b
xchg si, r13w
pop r15
movsx r13, ax
pop r14
pop r13
movzx bp, al
movsx r12w, r8b
pop r12
mov dil, 0x12
pop rdi
movzx ebp, r10w
movzx si, dl
movsxd rbp, r15d
pop rsi
mov bpl, sil
movsx ebp, r10w
bswap ebp
pop rbp
ret