Function at 0x14004c380
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor r15d, r15d
lea rax, [0x14014b758]
mov r14d, r8d
mov dword [rbp - 0x40], r15d
mov r13, rcx
and r14d, 0x100
mov esi, r8d
mov dword [rbp + 0x40], r14d
mov r12, rdx
lea rcx, [0x14014b760]
mov r9, rdx
cmovne rcx, rax
mov edx, 1
mov r8d, 4
mov ebx, r15d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, qword [r13 + 0x38]
xor edx, edx
call fcn.14004e7f0
mov rcx, qword [r13 + 0x48]
mov dword [rbp - 0x38], eax
call fcn.14004e7f0
mov ecx, dword [rbp - 0x38]
mov edi, eax
cmp ecx, 2
jne 0x14004c51a
dec eax
cmp eax, 1
ja 0x14004c534
mov eax, 0x800
or word [r13 + 0x10], ax
mov eax, esi
lea rdi, [rbp - 0x20]
and eax, 0x400
test r14d, r14d
je 0x14004c5cc
mov r14d, 0xffffffff
test eax, eax
jne 0x14004c466
mov rdx, qword [r13 + 0x28]
lea r9, [r13 + 0x28]
mov qword [rbp - 0x38], r9
cmp rdx, r14
ja 0x14004c466
mov r8, qword [r13 + 0x30]
lea rcx, [r13 + 0x30]
mov qword [rbp - 0x30], rcx
cmp r8, r14
jbe 0x14004c71e
mov r8, qword [r13 + 0x30]
lea rax, [r13 + 0x30]
mov rdx, qword [r13 + 0x28]
lea rdi, [rbp - 0x10]
mov qword [rbp - 0x30], rax
mov rax, r8
shr rax, 8
mov byte [rbp - 0x1f], al
mov rax, r8
shr rax, 0x10
mov byte [rbp - 0x1e], al
mov rax, r8
shr rax, 0x18
mov byte [rbp - 0x1d], al
mov rax, r8
shr rax, 0x20
mov byte [rbp - 0x1c], al
mov rax, r8
shr rax, 0x28
mov byte [rbp - 0x1b], al
mov rax, r8
shr rax, 0x30
mov byte [rbp - 0x1a], al
mov rax, r8
shr rax, 0x38
mov byte [rbp - 0x19], al
lea rax, [r13 + 0x28]
mov qword [rbp - 0x38], rax
mov rax, rdx
shr rax, 8
mov byte [rbp - 0x17], al
mov rax, rdx
shr rax, 0x10
mov byte [rbp - 0x16], al
mov rax, rdx
shr rax, 0x18
mov byte [rbp - 0x15], al
mov rax, rdx
shr rax, 0x20
mov byte [rbp - 0x14], al
mov rax, rdx
shr rax, 0x28
mov byte [rbp - 0x13], al
mov rax, rdx
shr rax, 0x30
mov byte [rbp - 0x12], al
mov rax, rdx
shr rax, 0x38
mov byte [rbp - 0x11], al
mov byte [rbp - 0x20], r8b
mov byte [rbp - 0x18], dl
jmp 0x14004c71e
cmp ecx, 1
jne 0x14004c534
cmp edi, 2
je 0x14004c418
mov eax, 0xf7ff
and word [r13 + 0x10], ax
jmp 0x14004c561
mov eax, 0xf7ff
and word [r13 + 0x10], ax
cmp ecx, 2
jne 0x14004c561
mov r8, qword [rbp + 0x58]
mov ecx, 0x7075
mov rdx, qword [r13 + 0x38]
call fcn.14004cd10
mov rbx, rax
test rax, rax
je 0x14004cce6
test r14d, r14d
jne 0x14004c422
cmp edi, 2
jne 0x14004c422
mov r8, qword [rbp + 0x58]
mov ecx, 0x6375
mov rdx, qword [r13 + 0x48]
call fcn.14004cd10
test rax, rax
jne 0x14004c5bb
test rbx, rbx
je 0x14004cce6
mov rcx, qword [rbx + 0x10]
mov rdi, qword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, rdi
test rdi, rdi
jne 0x14004c593
mov eax, 0xffffffff
jmp 0x14004ccf0
mov qword [rax], rbx
lea rdi, [rbp - 0x20]
mov rbx, rax
mov eax, esi
and eax, 0x400
mov r14d, 0xffffffff
test eax, eax
jne 0x14004c602
mov rdx, qword [r13 + 0x28]
lea r9, [r13 + 0x28]
mov qword [rbp - 0x38], r9
cmp rdx, r14
ja 0x14004c602
mov r8, qword [r13 + 0x30]
lea rcx, [r13 + 0x30]
mov qword [rbp - 0x30], rcx
cmp r8, r14
ja 0x14004c602
cmp qword [r13 + 0x60], r14
jbe 0x14004c71e
mov rdx, qword [r13 + 0x28]
lea r9, [r13 + 0x28]
mov qword [rbp - 0x38], r9
cmp rdx, r14
jb 0x14004c660
mov rax, rdx
mov byte [rbp - 0x20], dl
shr rax, 8
lea rdi, [rbp - 0x18]
mov byte [rbp - 0x1f], al
mov rax, rdx
shr rax, 0x10
mov byte [rbp - 0x1e], al
mov rax, rdx
shr rax, 0x18
mov byte [rbp - 0x1d], al
mov rax, rdx
shr rax, 0x20
mov byte [rbp - 0x1c], al
mov rax, rdx
shr rax, 0x28
mov byte [rbp - 0x1b], al
mov rax, rdx
shr rax, 0x30
mov byte [rbp - 0x1a], al
mov rax, rdx
shr rax, 0x38
mov byte [rbp - 0x19], al
mov r8, qword [r13 + 0x30]
lea rcx, [r13 + 0x30]
mov qword [rbp - 0x30], rcx
cmp r8, r14
jb 0x14004c6c2
mov byte [rdi], r8b
lea rcx, [r13 + 0x30]
mov rax, r8
shr rax, 8
mov byte [rdi + 1], al
mov rax, r8
shr rax, 0x10
mov byte [rdi + 2], al
mov rax, r8
shr rax, 0x18
mov byte [rdi + 3], al
mov rax, r8
shr rax, 0x20
mov byte [rdi + 4], al
mov rax, r8
shr rax, 0x28
mov byte [rdi + 5], al
mov rax, r8
shr rax, 0x30
mov byte [rdi + 6], al
mov rax, r8
shr rax, 0x38
mov byte [rdi + 7], al
add rdi, 8
mov r10, qword [r13 + 0x60]
cmp r10, r14
jb 0x14004c71e
mov byte [rdi], r10b
mov rax, r10
shr rax, 8
mov byte [rdi + 1], al
mov rax, r10
shr rax, 0x10
mov byte [rdi + 2], al
mov rax, r10
shr rax, 0x18
mov byte [rdi + 3], al
mov rax, r10
shr rax, 0x20
mov byte [rdi + 4], al
mov rax, r10
shr rax, 0x28
mov byte [rdi + 5], al
mov rax, r10
shr rax, 0x30
shr r10, 0x38
mov byte [rdi + 6], al
mov byte [rdi + 7], r10b
add rdi, 8
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x38], r9
lea rax, [rbp - 0x20]
cmp rdi, rax
je 0x14004c7d3
lea rax, [rbp - 0x20]
mov ecx, 0x18
sub di, ax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x14004c74a
mov rsi, r15
jmp 0x14004c7ae
mov qword [rax], r15
mov dword [rax + 8], 0x300
mov word [rax + 0xc], 1
mov word [rax + 0xe], di
test di, di
je 0x14004c7aa
movzx edi, di
test rdi, rdi
je 0x14004c77c
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbp - 0x40], rax
test rax, rax
jne 0x14004c791
mov rax, r15
mov rcx, rsi
mov qword [rsi + 0x10], rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, r15
jmp 0x14004c7ae
mov r8, rdi
lea rdx, [rbp - 0x20]
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbp - 0x40]
mov qword [rsi + 0x10], rax
jmp 0x14004c7ae
mov qword [rax + 0x10], r15
mov r8, qword [rbp - 0x30]
mov r9d, 1
mov rdx, qword [rbp - 0x38]
mov ecx, r9d
mov qword [rsi], rbx
mov rbx, rsi
mov esi, dword [rbp + 0x50]
mov r8, qword [r8]
mov rdx, qword [rdx]
mov dword [rbp - 0x40], ecx
jmp 0x14004c7dc
mov ecx, r15d
mov r9d, 1
mov eax, esi
and eax, 0x500
cmp eax, 0x500
jne 0x14004c805
cmp r8, r14
jae 0x14004c800
cmp rdx, r14
jae 0x14004c800
bt esi, 9
jae 0x14004c808
cmp qword [r13 + 0x60], r14
jb 0x14004c808
mov r15d, r9d
jmp 0x14004c808
mov r15d, ecx
cmp dword [rbp + 0x40], 0
mov esi, 0x2d
jne 0x14004c83e
movzx eax, si
test r15d, r15d
jne 0x14004c820
movzx eax, word [r13 + 0xc]
movzx edi, ax
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
test r15d, r15d
jne 0x14004c848
movzx esi, word [r13 + 0xe]
movzx edi, si
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
movzx edi, word [r13 + 0x10]
mov rdx, r12
and edi, 0xfff9
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
movzx edi, word [r13 + 0x14]
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rax, qword [r13 + 0x18]
lea rcx, [rbp - 0x28]
mov qword [rbp - 0x28], rax
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64]
mov rdx, r12
movzx ecx, word [rax + 8]
movzx r15d, word [rax + 0x14]
movzx esi, word [rax + 0x10]
movzx r14d, word [rax + 0xc]
shl cx, 6
add cx, word [rax + 4]
mov eax, dword [rax]
shl cx, 5
sar eax, 1
add cx, ax
movzx edi, cx
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shl r15w, 4
mov eax, 0x301
add r15w, si
mov rdx, r12
add r15w, ax
shl r15w, 5
add r15w, r14w
movzx edi, r15w
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov edi, dword [r13 + 0x20]
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 8
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 0x10
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 0x18
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rax, qword [rbp - 0x38]
mov rdi, qword [rax]
mov esi, 0xffffffff
mov rdx, r12
cmp rdi, rsi
jae 0x14004c9c3
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 8
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 0x10
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 0x18
mov ecx, edi
jmp 0x14004c9ef
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r12
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r12
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov ecx, 0xff
mov rdx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rax, qword [rbp - 0x30]
mov rdx, r12
mov rdi, qword [rax]
cmp rdi, rsi
jae 0x14004ca3a
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 8
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 0x10
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 0x18
mov ecx, edi
jmp 0x14004ca66
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r12
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r12
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov ecx, 0xff
mov rdx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rax, qword [r13 + 0x38]
xor r14d, r14d
test rax, rax
jne 0x14004ca81
movzx eax, r14w
jmp 0x14004ca85
movzx eax, word [rax + 8]
movzx edi, ax
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rcx, qword [r13 + 0x40]
movzx r8d, r14w
mov r15d, dword [rbp + 0x50]
test rcx, rcx
je 0x14004cae1
nop dword [rax]
nop dword [rax + rax]
mov eax, dword [rcx + 8]
and eax, r15d
test eax, 0x300
je 0x14004cad9
movzx eax, word [rcx + 0xe]
add ax, 4
add r8w, ax
mov rcx, qword [rcx]
test rcx, rcx
jne 0x14004cac0
mov rcx, rbx
movzx edx, r14w
test rbx, rbx
je 0x14004cb0c
nop dword [rax]
test dword [rcx + 8], 0x300
je 0x14004cb04
movzx eax, word [rcx + 0xe]
add ax, 4
add dx, ax
mov rcx, qword [rcx]
test rcx, rcx
jne 0x14004caf0
add dx, r8w
movzx edi, dx
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov edi, dword [rbp + 0x40]
test edi, edi
jne 0x14004cc32
mov rax, qword [r13 + 0x48]
test rax, rax
je 0x14004cb47
movzx r14d, word [rax + 8]
movzx edi, r14w
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
movzx edi, word [r13 + 0x50]
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
movzx edi, word [r13 + 0x54]
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 8
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov edi, dword [r13 + 0x58]
mov rdx, r12
movzx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 8
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov eax, edi
mov rdx, r12
shr eax, 0x10
movzx ecx, al
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
shr edi, 0x18
mov rdx, r12
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rcx, qword [r13 + 0x60]
mov rdx, r12
cmp rcx, rsi
jae 0x14004cbfa
call fcn.14004ce10
jmp 0x14004cc2f
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r12
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r12
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r12
mov ecx, 0xff
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov edi, dword [rbp + 0x40]
mov rcx, qword [r13 + 0x38]
mov esi, 1
test rcx, rcx
je 0x14004cc53
movzx edx, word [rcx + 8]
mov r9, r12
mov rcx, qword [rcx]
mov r8d, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
test rbx, rbx
je 0x14004cc68
mov r8, r12
mov edx, 0x300
mov rcx, rbx
call fcn.14004d770
mov rcx, qword [r13 + 0x40]
test rcx, rcx
je 0x14004cc7c
mov r8, r12
mov edx, r15d
call fcn.14004d770
test edi, edi
jne 0x14004cc9c
mov rcx, qword [r13 + 0x48]
test rcx, rcx
je 0x14004cc9c
movzx edx, word [rcx + 8]
mov r9, r12
mov rcx, qword [rcx]
mov r8, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
test rbx, rbx
je 0x14004ccbf
mov rcx, qword [rbx + 0x10]
mov rdi, qword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, rdi
test rdi, rdi
jne 0x14004cca1
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
test eax, eax
je 0x14004cced
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
mov rax, qword [rbp + 0x58]
test rax, rax
je 0x14004cce6
mov dword [rax], 6
mov dword [rax + 4], ecx
mov eax, 0xffffffff
jmp 0x14004ccf0
mov eax, dword [rbp - 0x40]
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret