Function at 0x140042980
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
xor r12d, r12d
lea r15, [0x1401d1bc0]
mov eax, dword [rsp + 0xa0]
and eax, 1
mov dword [rsp + 0x2c], eax
xor eax, 1
mov r14, rdx
mov rsi, r8
mov qword [rsp + 0x80], rcx
mov rbp, r9
mov rdi, rcx
mov byte [rsp + 0x27], al
nop dword [rax + rax]
mov r13, r14
test r14, r14
js 0x140042b7f
je 0x140042bd3
mov edx, dword [0x1401c0930]
xor ebx, ebx
jmp 0x1400429f5
add rbx, 1
cmp rbx, r14
je 0x140042f88
movzx eax, byte [rdi + rbx]
movsx eax, byte [r15 + rax]
add eax, edx
test eax, eax
jle 0x1400429e8
cmp rbx, r14
je 0x140042f88
lea r13, [rdi + rbx]
cmp byte [rsp + 0x27], 0
je 0x140042da0
cmp rdi, qword [rsp + 0x80]
jne 0x140042da0
add r12, 1
test rsi, rsi
je 0x140042de8
mov rdx, qword [rsi]
test rdx, rdx
je 0x140042ec0
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, 1
je 0x140042ec0
mov rdx, qword [rsi + 0x10]
lea rcx, [rax + 1]
mov qword [rsi + 8], rcx
mov byte [rdx + rax], 0x22
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
mov byte [rdx + rax], 0
test rbp, rbp
je 0x140042f20
mov rdx, rbp
mov ecx, 0x22
call sub.msvcrt.dll_fputc
mov r8, rbx
mov rdx, rdi
mov rcx, rsi
call fcn.14007e800
mov rdx, rbx
mov r9, rbp
mov r8d, 1
mov rcx, rdi
call sub.msvcrt.dll_fwrite
mov rdx, qword [rsi]
add r12, rbx
test rdx, rdx
je 0x140042dcf
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, 1
je 0x140042dcf
mov rdx, qword [rsi + 0x10]
lea rcx, [rax + 1]
mov qword [rsi + 8], rcx
mov byte [rdx + rax], 0x5c
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
mov byte [rdx + rax], 0
test rbp, rbp
je 0x140042af6
mov rdx, rbp
mov ecx, 0x5c
call sub.msvcrt.dll_fputc
movzx r8d, byte [r13]
lea rax, [r14 - 1]
lea rdi, [r13 + 1]
sub rax, rbx
test r14, r14
cmovns r14, rax
movzx eax, r8b
mov r13d, r8d
movzx ebx, byte [r15 + rax]
cmp bl, 0x1f
jle 0x140042c88
test rsi, rsi
je 0x140042b5f
mov rdx, qword [rsi]
test rdx, rdx
je 0x140042ea0
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, 1
je 0x140042ea0
mov rdx, qword [rsi + 0x10]
lea rcx, [rax + 1]
mov qword [rsi + 8], rcx
mov byte [rdx + rax], bl
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
mov byte [rdx + rax], 0
test rbp, rbp
je 0x140042b6f
movsx ecx, bl
mov rdx, rbp
call sub.msvcrt.dll_fputc
add r12, 2
mov r13, r14
test r14, r14
jns 0x1400429d4
movzx eax, byte [rdi]
mov edx, dword [0x1401c0930]
mov rcx, rax
movsx eax, byte [r15 + rax]
add eax, edx
test eax, eax
jg 0x140042f33
xor ebx, ebx
nop dword [rax]
add rbx, 1
movzx eax, byte [rdi + rbx]
movsx eax, byte [r15 + rax]
add eax, edx
test eax, eax
jle 0x140042ba0
cmp rbx, r14
je 0x140042f88
lea r13, [rdi + rbx]
movzx ecx, byte [r13]
test cl, cl
jne 0x140042a11
add r12, rbx
mov r13, rbx
test rsi, rsi
je 0x140042f60
mov r8, r13
mov rdx, rdi
mov rcx, rsi
call fcn.14007e800
test rbp, rbp
je 0x140042f3d
mov r9, rbp
mov r8d, 1
mov rdx, r13
mov rcx, rdi
call sub.msvcrt.dll_fwrite
cmp rdi, qword [rsp + 0x80]
je 0x140042fa6
mov edx, dword [rsp + 0x2c]
test edx, edx
jne 0x140042c71
test rsi, rsi
je 0x140042c60
mov rdx, qword [rsi]
test rdx, rdx
jne 0x140042f90
mov edx, 1
mov rcx, rsi
call fcn.14007da40
mov rax, qword [rsi + 8]
mov rdx, qword [rsi + 0x10]
lea rcx, [rax + 1]
mov qword [rsi + 8], rcx
mov byte [rdx + rax], 0x22
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
mov byte [rdx + rax], 0
test rbp, rbp
je 0x140042c6d
mov rdx, rbp
mov ecx, 0x22
call sub.msvcrt.dll_fputc
add r12, 1
mov rax, r12
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test rsi, rsi
je 0x140042e20
mov ebx, r8d
mov rdx, qword [rsi]
sar ebx, 6
add ebx, 0x30
test rdx, rdx
je 0x140042e78
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, 1
je 0x140042e78
mov rdx, qword [rsi + 0x10]
lea rcx, [rax + 1]
mov qword [rsi + 8], rcx
mov byte [rdx + rax], bl
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
mov byte [rdx + rax], 0
test rbp, rbp
je 0x140042ceb
mov rdx, rbp
mov ecx, ebx
mov dword [rsp + 0x28], r8d
call sub.msvcrt.dll_fputc
mov r8d, dword [rsp + 0x28]
sar r8d, 3
mov rdx, qword [rsi]
and r8d, 7
lea ebx, [r8 + 0x30]
test rdx, rdx
je 0x140042f00
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, 1
je 0x140042f00
mov rdx, qword [rsi + 0x10]
lea rcx, [rax + 1]
mov qword [rsi + 8], rcx
mov byte [rdx + rax], bl
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
mov byte [rdx + rax], 0
test rbp, rbp
je 0x140042d3e
mov rdx, rbp
mov ecx, ebx
call sub.msvcrt.dll_fputc
mov rdx, qword [rsi]
and r13d, 7
add r13d, 0x30
test rdx, rdx
je 0x140042ee0
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, 1
je 0x140042ee0
mov rdx, qword [rsi + 0x10]
lea rcx, [rax + 1]
mov qword [rsi + 8], rcx
mov byte [rdx + rax], r13b
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
mov byte [rdx + rax], 0
test rbp, rbp
je 0x140042d90
movsx ecx, r13b
mov rdx, rbp
call sub.msvcrt.dll_fputc
add r12, 4
jmp 0x1400429c8
test rsi, rsi
je 0x140042e68
mov r8, rbx
mov rdx, rdi
mov rcx, rsi
call fcn.14007e800
test rbp, rbp
jne 0x140042a94
mov rdx, qword [rsi]
add r12, rbx
test rdx, rdx
jne 0x140042ab7
mov edx, 1
mov rcx, rsi
call fcn.14007da40
mov rax, qword [rsi + 8]
jmp 0x140042ac8
add r12, rbx
test rbp, rbp
je 0x140042af6
mov rdx, rbp
mov ecx, 0x22
call sub.msvcrt.dll_fputc
mov r9, rbp
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_fwrite
jmp 0x140042ae9
test rbp, rbp
je 0x140042d90
mov ecx, r8d
mov rdx, rbp
mov dword [rsp + 0x28], r8d
and r13d, 7
sar ecx, 6
add r13d, 0x30
add ecx, 0x30
call sub.msvcrt.dll_fputc
mov r8d, dword [rsp + 0x28]
mov rdx, rbp
sar r8d, 3
and r8d, 7
lea ecx, [r8 + 0x30]
call sub.msvcrt.dll_fputc
jmp 0x140042d84
add r12, rbx
test rbp, rbp
jne 0x140042e01
jmp 0x140042af6
mov edx, 1
mov rcx, rsi
mov dword [rsp + 0x28], r8d
call fcn.14007da40
mov rax, qword [rsi + 8]
mov r8d, dword [rsp + 0x28]
jmp 0x140042cb7
mov edx, 1
mov rcx, rsi
call fcn.14007da40
mov rax, qword [rsi + 8]
jmp 0x140042b44
mov edx, 1
mov rcx, rsi
call fcn.14007da40
mov rax, qword [rsi + 8]
jmp 0x140042a54
mov edx, 1
mov rcx, rsi
call fcn.14007da40
mov rax, qword [rsi + 8]
jmp 0x140042d63
mov edx, 1
mov rcx, rsi
call fcn.14007da40
mov rax, qword [rsi + 8]
jmp 0x140042d14
mov r8, rbx
mov rdx, rdi
mov rcx, rsi
call fcn.14007e800
jmp 0x140042dc0
mov r13, rdi
xor ebx, ebx
jmp 0x140042bc5
cmp rdi, qword [rsp + 0x80]
je 0x140042fa6
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x140042c71
mov rdx, qword [rsi]
test rdx, rdx
jne 0x140042f90
jmp 0x140042c2e
test rbp, rbp
jne 0x140042bf3
cmp rdi, qword [rsp + 0x80]
je 0x140042fa6
mov ecx, dword [rsp + 0x2c]
test ecx, ecx
jne 0x140042c71
jmp 0x140042c6d
add r12, r14
jmp 0x140042bd3
mov rax, qword [rsi + 8]
sub rdx, rax
cmp rdx, 1
jne 0x140042c3f
jmp 0x140042c2e
xor r12d, r12d
jmp 0x140042c71