Function at 0x140040bf0
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rdi, qword [rcx + 0x1c8]
mov dword [rcx + 0x1ac], 0
mov rbp, rcx
mov r12, rdx
movzx ecx, word [rdx + 0x28]
mov qword [rdi + 8], 0
cmp cl, 0x34
jne 0x140040d15
mov rsi, qword [rdx]
mov qword [rsp + 0x28], rsi
test rsi, rsi
je 0x140040f5f
movzx eax, byte [rsi + 0x28]
cmp ax, 0x1f
je 0x140040f5f
cmp ax, 0x35
jne 0x140040c91
jmp 0x140040ee0
mov r8d, 1
mov rdx, rdi
mov rcx, rsi
call sym.hb_pp_tokenStr.constprop.25
mov rbx, qword [rsi]
test rbx, rbx
je 0x140040d55
movzx eax, byte [rbx + 0x28]
cmp ax, 0x1f
je 0x140040d55
cmp ax, 0x35
je 0x140040ee3
mov rdi, qword [rbp + 0x1c8]
mov rsi, rbx
cmp ax, 0x1e
jne 0x140040c52
cmp qword [rsi], 0
jne 0x140040c52
mov rdx, qword [rbp + 0x230]
mov rax, qword [rdx + 0x10]
test rax, rax
je 0x140040c52
mov rcx, qword [rax]
mov r8, rax
mov qword [rdx + 0x10], rcx
movzx ecx, byte [rax + 0x28]
mov qword [rsi], rax
cmp cx, 0x1f
je 0x140040cf2
cmp cx, 0x1e
je 0x140040f92
mov rax, qword [rdx + 0x10]
test rax, rax
je 0x140040f92
mov rcx, qword [rax]
mov qword [rdx + 0x10], rcx
movzx ecx, byte [rax + 0x28]
mov qword [r8], rax
mov r8, rax
cmp cx, 0x1f
jne 0x140040cc4
mov qword [rax], 0
mov eax, dword [rdx + 0x18]
add eax, 1
cmp qword [rdx + 0x10], 0
mov dword [rdx + 0x1c], eax
je 0x140040c52
mov dword [rdx + 0x18], eax
jmp 0x140040c52
xor edx, edx
mov rax, qword [rdi]
cmp qword [rdi + 0x10], rdx
je 0x140040e58
lea rcx, [rdx + 1]
mov qword [rdi + 8], rcx
mov rcx, rbp
mov byte [rax + rdx], 0
mov rax, qword [rbp + 0x1c8]
mov edx, 2
mov r8, qword [rax]
call sym.hb_pp_error.constprop.31
nop
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r13d, 1
mov rax, qword [rsp + 0x28]
mov qword [rsi], 0
mov qword [r12], rbx
test rax, rax
je 0x140040d81
cmp word [rax + 0x28], 0
js 0x140040d81
lea rcx, [rsp + 0x28]
call sym.hb_pp_tokenListFree.part.7
mov rax, qword [rbp + 0x1c8]
mov rbx, qword [rax + 8]
mov rsi, qword [rax]
test byte [r12 + 0x29], 0x40
je 0x140040f50
cmp rbx, 1
ja 0x140040e73
movzx ecx, word [r12 + 0x28]
xor eax, eax
test rbx, rbx
je 0x140040dba
movzx eax, byte [rsi]
mov ebx, 1
mov rdx, qword [0x1400bc3b0]
or ch, 0x40
mov rax, qword [rdx + rax*8]
mov qword [r12 + 0x10], rax
xor cl, cl
mov eax, dword [rbp + 0x164]
mov qword [r12 + 0x18], rbx
or ecx, 0x29
mov word [r12 + 0x28], cx
test eax, eax
je 0x140040e37
mov rcx, qword [rbp + 0x1c8]
test r13d, r13d
je 0x140040ea1
mov r8, qword [rcx + 8]
mov r9, qword [rbp + 0x180]
mov edx, 1
mov rcx, qword [rcx]
call sym.fwrite
mov rdi, qword [rbp + 0x1c8]
mov rdx, qword [rdi + 8]
cmp rax, rdx
je 0x140040d17
mov r8, qword [rbp + 0x178]
mov edx, 0x22
mov rcx, rbp
call sym.hb_pp_error.constprop.30
test r13d, r13d
je 0x140040d48
mov rdi, qword [rbp + 0x1c8]
mov rdx, qword [rdi + 8]
mov rax, qword [rdi]
cmp qword [rdi + 0x10], rdx
jne 0x140040d24
add rdx, rdx
mov rcx, rax
mov qword [rdi + 0x10], rdx
call sym.hb_xrealloc
mov rdx, qword [rdi + 8]
mov qword [rdi], rax
jmp 0x140040d24
lea rcx, [rbx + 1]
call sym.hb_xgrab
mov r8, rbx
mov rdx, rsi
mov rcx, rax
call sym.memcpy
movzx ecx, word [r12 + 0x28]
mov byte [rax + rbx], 0
mov qword [r12 + 0x10], rax
and ch, 0xbf
jmp 0x140040dcd
mov edx, 0x5d
call sym.hb_membufAddCh
mov rax, qword [rbp + 0x1c8]
mov edx, 1
mov r9, qword [rbp + 0x180]
mov r8, qword [rax + 8]
mov rcx, qword [rax]
call sym.fwrite
mov rdx, qword [rbp + 0x1c8]
cmp rax, qword [rdx + 8]
je 0x140040d48
jmp 0x140040e23
mov rbx, rsi
cmp qword [rbx + 0x20], 0
je 0x140040f17
nop word [rax + rax]
mov rsi, qword [rbp + 0x1c8]
mov rdx, qword [rsi + 8]
mov rcx, qword [rsi]
cmp rdx, qword [rsi + 0x10]
je 0x140040f25
lea rax, [rdx + 1]
mov qword [rsi + 8], rax
mov byte [rcx + rdx], 0x20
sub qword [rbx + 0x20], 1
jne 0x140040ef0
mov rsi, rbx
xor r13d, r13d
mov rbx, qword [rbx]
jmp 0x140040d5b
add rdx, rdx
mov qword [rsi + 0x10], rdx
call sym.hb_xrealloc
mov rdx, qword [rsi + 8]
mov qword [rsi], rax
lea rcx, [rdx + 1]
mov qword [rsi + 8], rcx
mov byte [rax + rdx], 0x20
sub qword [rbx + 0x20], 1
jne 0x140040ef0
jmp 0x140040f17
mov rcx, qword [r12 + 0x10]
call sym.hb_xfree
jmp 0x140040d9b
test ch, 0x40
je 0x140040f73
mov r13d, 1
xor ebx, ebx
xor eax, eax
jmp 0x140040dba
mov rcx, qword [r12 + 0x10]
mov r13d, 1
xor ebx, ebx
call sym.hb_xfree
movzx ecx, word [r12 + 0x28]
xor eax, eax
jmp 0x140040dba
mov qword [r8], 0
jmp 0x140040c52