Function at 0x140020670
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x7fe0]
mov eax, 0x80e0
call fcn.140057320
sub rsp, rax
mov rax, qword [0x140079010]
xor rax, rsp
mov qword [rbp + 0x7fd0], rax
mov r15, r9
mov ebx, r8d
mov r14, rdx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsi + 0x18]
mov qword [rsp + 0x30], rdx
lea r9, [rsi + 0xc18]
mov dword [rsp + 0x28], eax
lea r8, str._s__i:_i_:__s
mov eax, dword [rsi + 0x10]
lea rcx, [rbp - 0x30]
mov edx, 0x1000
mov dword [rsp + 0x20], eax
call fcn.1400201c0
xor r12d, r12d
lea rdi, [rbp + 0x3fd0]
test ebx, ebx
je 0x14002071b
call fcn.140001780
mov qword [rsp + 0x28], r15
lea rdx, [rbp + 0x3fd0]
mov r9, r14
mov qword [rsp + 0x20], r12
mov r8d, 0x1000
mov rcx, qword [rax]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vswprintf]
jmp 0x14002071e
mov rdi, r14
mov rbx, 0xffffffffffffffff
lea rcx, [rbp - 0x30]
mov rax, rbx
nop dword [rax]
inc rax
cmp word [rcx + rax*2], r12w
jne 0x140020730
cmp eax, 0x1000
jae 0x140020786
movsxd r8, eax
mov rcx, rbx
nop word [rax + rax]
inc rcx
cmp word [rdi + rcx*2], r12w
jne 0x140020750
movsxd r9, ecx
lea r8, [rbp + r8*2 - 0x30]
mov rdx, r12
cmp rdx, r9
jge 0x140020959
movzx ecx, word [rdi + rdx*2]
inc eax
mov word [r8], cx
inc rdx
add r8, 2
cmp eax, 0x1000
jb 0x140020765
movsxd rcx, eax
lea rax, [rcx*2 - 2]
cmp rax, 0x2000
jae 0x140020973
mov word [rbp + rax - 0x30], r12w
mov dword [rbp + rcx*2 - 0x36], 0x2e002e
mov dword [rbp + rcx*2 - 0x3a], 0x2e0020
cmp byte [rsi + 0xe18], r12b
je 0x1400208f4
cmp qword [rsi + 0xe20], r12
je 0x1400208f4
lea rcx, [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64_s]
lea r9, [rsp + 0x50]
mov edx, 0x50
lea r8, str._d__m__Y__I:_M:_S
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll_strftime]
lea rax, [rbp - 0x30]
mov rdi, rbx
nop word [rax + rax]
cmp word [rax + rdi*2 + 2], r12w
lea rdi, [rdi + 1]
jne 0x140020810
mov qword [rsp + 0x38], r12
lea r9d, [rdi + 1]
mov qword [rsp + 0x30], r12
lea r8, [rbp - 0x30]
mov dword [rsp + 0x28], r12d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r8d, 0x2000
mov qword [rsp + 0x38], r12
cmp eax, r8d
mov qword [rsp + 0x30], r12
lea r9d, [rdi + 1]
mov ecx, 0xfde9
cmovl r8d, eax
lea rax, [rbp + 0x5fd0]
mov dword [rsp + 0x28], r8d
xor edx, edx
lea r8, [rbp - 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rax, [rbp + 0x5fd0]
mov edx, 0x2000
lea r9, [rbp - 0x80]
mov qword [rsp + 0x20], rax
lea r8, str.__s__t_s_r_n
lea rcx, [rbp + 0x1fd0]
call fcn.14001d700
lea rax, [rbp + 0x1fd0]
mov dword [rsp + 0x40], r12d
mov r8, rbx
nop dword [rax]
inc r8
cmp byte [rax + r8], r12b
jne 0x1400208c0
mov rcx, qword [rsi + 0xe20]
lea r9, [rsp + 0x40]
lea rdx, [rbp + 0x1fd0]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsi + 0xe20]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [rsi + 0xe28]
test rcx, rcx
je 0x140020938
lea rax, [rbp - 0x30]
nop
cmp word [rax + rbx*2 + 2], r12w
lea rbx, [rbx + 1]
jne 0x140020910
lea r8d, [rbx*2 + 2]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
lea rdx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp + 0x7fd0]
xor rcx, rsp
call fcn.14002aab0
add rsp, 0x80e0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
movsxd rcx, eax
add rcx, rcx
cmp rcx, 0x2000
jae 0x140020973
mov word [rbp + rcx - 0x30], r12w
jmp 0x1400207b3
call fcn.14002aea0
int3