Function at 0x140048224
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov qword [rbp - 1], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rax, qword [0x1400700d8]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r15, r8
mov qword [rbp - 0x21], r8
movsxd rsi, edx
mov qword [rbp - 9], rcx
mov rax, rsi
mov qword [rbp - 0x11], rax
mov r12, rsi
sar r12, 6
lea rcx, [0x140000000]
and eax, 0x3f
lea r14, [rax + rax*8]
mov rax, qword [rcx + r12*8 + 0x73ed0]
mov rax, qword [rax + r14*8 + 0x28]
mov qword [rbp - 0x49], rax
mov r13d, r9d
add r13, r8
mov qword [rbp - 0x51], r13
call qword [sym.imp.kernel32.dll_GetConsoleOutputCP]
nop
mov dword [rbp - 0x59], eax
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.1400401f4
nop
mov rcx, qword [rsp + 0x58]
mov edx, dword [rcx + 0xc]
mov dword [rbp - 0x55], edx
xor r11d, r11d
mov dword [rbp - 0x69], r11d
mov ebx, r11d
mov dword [rbp - 0x65], ebx
mov ecx, r11d
mov dword [rsp + 0x40], ecx
mov rdi, r15
cmp r15, r13
jae 0x1400486cc
mov rax, rsi
sar rax, 6
mov qword [rbp - 0x19], rax
mov rsi, r15
mov cl, byte [rdi]
mov byte [rsp + 0x44], cl
mov dword [rsp + 0x48], r11d
mov r15d, 1
cmp edx, 0xfde9
jne 0x14004847d
mov edx, r11d
mov rsi, r11
lea r15, [0x140000000]
mov r8, qword [r15 + rax*8 + 0x73ed0]
lea rax, [r8 + r14*8]
cmp byte [rax + rsi + 0x3e], r11b
je 0x140048334
inc edx
inc rsi
cmp rsi, 5
jl 0x140048322
test rsi, rsi
jle 0x140048420
mov rax, qword [r15 + r12*8 + 0x73ed0]
movzx ecx, byte [rax + r14*8 + 0x3e]
movsx r15d, byte [rcx + r15 + 0x70a40]
inc r15d
mov r13d, r15d
sub r13d, edx
mov r9, qword [rbp - 0x51]
sub r9, rdi
movsxd r10, r13d
cmp r10, r9
jg 0x1400485f2
mov rdx, r11
lea rax, [rbp + 7]
sub r8, rax
lea r9, [r8 + r14*8]
lea rcx, [rbp + 7]
add rcx, rdx
mov al, byte [rcx + r9 + 0x3e]
mov byte [rcx], al
inc rdx
cmp rdx, rsi
jl 0x14004837e
test r13d, r13d
jle 0x1400483af
lea rcx, [rbp + 7]
add rcx, rsi
mov r8, r10
mov rdx, rdi
call fcn.14003b1a0
nop
xor r11d, r11d
mov rdx, r11
lea r8, [0x140000000]
lea rcx, [rdx + r14*8]
mov rax, qword [r8 + r12*8 + 0x73ed0]
mov byte [rcx + rax + 0x3e], r11b
inc rdx
cmp rdx, rsi
jl 0x1400483b9
mov qword [rbp - 0x41], r11
lea rax, [rbp + 7]
mov qword [rbp - 0x39], rax
mov eax, r11d
cmp r15d, 4
sete al
inc eax
mov r15d, eax
mov r8d, eax
lea r9, [rbp - 0x41]
lea rdx, [rbp - 0x39]
lea rcx, [rsp + 0x48]
call fcn.140049480
nop
cmp rax, 0xffffffffffffffff
je 0x1400484e7
lea eax, [r13 - 1]
movsxd rsi, eax
add rsi, rdi
mov r13, qword [rbp - 0x51]
jmp 0x14004850a
movzx eax, byte [rdi]
movsx rsi, byte [rax + r15 + 0x70a40]
lea ecx, [rsi + 1]
mov rdx, r13
sub rdx, rdi
movsxd rax, ecx
cmp rax, rdx
jg 0x14004862d
mov qword [rbp - 0x31], r11
mov qword [rbp - 0x29], rdi
mov eax, r11d
cmp ecx, 4
sete al
inc eax
mov ebx, eax
mov r8d, eax
lea r9, [rbp - 0x31]
lea rdx, [rbp - 0x29]
lea rcx, [rsp + 0x48]
call fcn.140049480
nop
cmp rax, 0xffffffffffffffff
je 0x1400484e7
add rsi, rdi
mov r15d, ebx
jmp 0x14004850a
lea rax, [0x140000000]
mov rdx, qword [rax + r12*8 + 0x73ed0]
mov cl, byte [rdx + r14*8 + 0x3d]
test cl, 4
je 0x1400484b1
mov al, byte [rdx + r14*8 + 0x3e]
mov byte [rbp + 0xf], al
mov al, byte [rdi]
mov byte [rbp + 0x10], al
and cl, 0xfb
mov byte [rdx + r14*8 + 0x3d], cl
lea rdx, [rbp + 0xf]
jmp 0x1400484d1
call fcn.140047b04
nop
movzx ecx, byte [rdi]
xor edx, edx
cmp word [rax + rcx*2], dx
jge 0x1400484f0
inc rsi
cmp rsi, r13
jae 0x140048686
mov rdx, rdi
mov r8d, 2
lea rcx, [rsp + 0x48]
call fcn.14004402c
nop
cmp eax, 0xffffffff
jne 0x14004850a
cmp byte [rbp - 0x71], 0
jmp 0x140048680
mov r8, r15
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.14004402c
nop
cmp eax, 0xffffffff
je 0x1400486be
lea rdi, [rsi + 1]
xor ebx, ebx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 5
lea rax, [rbp + 0x17]
mov qword [rsp + 0x20], rax
mov r9d, r15d
lea r8, [rsp + 0x48]
xor edx, edx
mov ecx, dword [rbp - 0x59]
call fcn.1400472b4
nop
mov esi, eax
test eax, eax
je 0x140048720
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x4c]
mov r8d, eax
lea rdx, [rbp + 0x17]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.kernel32.dll_WriteFile]
nop
xor r11d, r11d
test eax, eax
je 0x140048716
mov ebx, edi
sub ebx, dword [rbp - 0x21]
mov r15d, dword [rsp + 0x40]
add ebx, r15d
mov dword [rbp - 0x65], ebx
cmp dword [rsp + 0x4c], esi
jb 0x14004867c
cmp byte [rsp + 0x44], 0xa
jne 0x1400485da
lea eax, [r11 + 0xd]
mov word [rsp + 0x44], ax
mov qword [rsp + 0x20], r11
lea r9, [rsp + 0x4c]
lea r8d, [r11 + 1]
lea rdx, [rsp + 0x44]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.kernel32.dll_WriteFile]
nop
xor r11d, r11d
test eax, eax
je 0x1400486b4
cmp dword [rsp + 0x4c], 1
jb 0x14004867c
inc r15d
mov dword [rsp + 0x40], r15d
inc ebx
mov dword [rbp - 0x65], ebx
mov rsi, rdi
cmp rdi, r13
jae 0x1400486c8
mov rax, qword [rbp - 0x19]
mov edx, dword [rbp - 0x55]
jmp 0x1400482ec
mov r8d, r11d
test r9, r9
jle 0x140048628
sub rdi, rsi
lea rbx, [0x140000000]
lea rdx, [rsi + r14*8]
mov rcx, qword [rbx + r12*8 + 0x73ed0]
mov al, byte [rdi + rsi]
mov byte [rdx + rcx + 0x3e], al
inc r8d
inc rsi
movsxd rax, r8d
cmp rax, r9
jl 0x140048604
mov ebx, dword [rbp - 0x65]
add ebx, r9d
jmp 0x140048679
mov r9d, r11d
test rdx, rdx
jle 0x140048677
mov r8, r11
mov r13, qword [rbp - 0x11]
mov r10, r13
sar r10, 6
and r13d, 0x3f
lea r11, [r13*8]
add r11, r13
mov rcx, qword [r15 + r10*8 + 0x73ed0]
add rcx, r8
mov al, byte [r8 + rdi]
mov byte [rcx + r11*8 + 0x3e], al
inc r9d
inc r8
movsxd rax, r9d
cmp rax, rdx
jl 0x140048652
xor r11d, r11d
add ebx, edx
mov dword [rbp - 0x65], ebx
cmp byte [rbp - 0x71], r11b
mov ecx, dword [rsp + 0x40]
jmp 0x1400486d0
lea r8, [0x140000000]
mov rcx, qword [r8 + r12*8 + 0x73ed0]
mov al, byte [rdi]
mov byte [rcx + r14*8 + 0x3e], al
mov rax, qword [r8 + r12*8 + 0x73ed0]
or byte [rax + r14*8 + 0x3d], 4
inc ebx
mov dword [rbp - 0x65], ebx
cmp byte [rbp - 0x71], dl
jmp 0x140048680
call qword [sym.imp.kernel32.dll_GetLastError]
nop
mov dword [rbp - 0x69], eax
mov ecx, dword [rsp + 0x40]
cmp byte [rbp - 0x71], 0
jmp 0x1400486d0
mov ecx, dword [rsp + 0x40]
cmp byte [rbp - 0x71], r11b
je 0x1400486de
mov rax, qword [rsp + 0x50]
and dword [rax + 0x3a8], 0xfffffffd
movsd xmm0, qword [rbp - 0x69]
mov rax, qword [rbp - 9]
movsd qword [rax], xmm0
mov dword [rax + 8], ecx
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.14001bc60
nop
mov rbx, qword [rsp + 0x140]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
nop
mov dword [rbp - 0x69], eax
mov ecx, dword [rsp + 0x40]
cmp byte [rbp - 0x71], bl
jmp 0x1400486d0