Function at 0x140012500
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rax, qword [0x1401fa3e0]
mov rdi, rax
mov rcx, qword [rax + 0x58]
test rcx, rcx
je 0x14001256e
cmp byte [rax + 1], 0
je 0x14001256e
mov byte [rcx + 0x18], 0
mov rbx, qword [rax + 0x58]
test rbx, rbx
je 0x14001256e
mov rcx, rbx
call fcn.140034930
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012558
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rax, qword [0x1401fa3e0]
xor r15d, r15d
mov qword [rdi + 0x58], r15
mov rcx, qword [rdi + 0x3c60]
test rcx, rcx
je 0x1400125ad
mov qword [rdi + 0x3c58], r15
test rax, rax
je 0x140012593
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3c60], r15
mov rax, qword [0x1401fa3e0]
cmp byte [rdi], r15b
je 0x140012e57
cmp byte [rdi + 0x5ba1], r15b
je 0x140012617
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x140012617
mov dword [rax + 0x5ba4], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.140029cd0
mov rsi, rax
lea rdx, [0x1401a332c]
mov rcx, rbx
call fcn.140010070
mov rbx, rax
test rax, rax
je 0x140012617
mov r9, rax
mov r8, qword [rsp + 0x40]
mov edx, 1
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov edx, 6
mov rcx, rdi
call fcn.140012e70
mov esi, r15d
cmp dword [rdi + 0x3e70], r15d
jle 0x140012687
mov r14, r15
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdi + 0x3e78]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140012679
mov rcx, rbx
call fcn.140013490
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x14001266a
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e70]
jl 0x140012640
mov rcx, qword [rdi + 0x3e78]
test rcx, rcx
je 0x1400126bf
mov qword [rdi + 0x3e70], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x1400126ac
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e78], r15
mov rcx, qword [rdi + 0x3e88]
test rcx, rcx
je 0x1400126f7
mov qword [rdi + 0x3e80], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x1400126e4
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e88], r15
mov rcx, qword [rdi + 0x3e98]
test rcx, rcx
je 0x14001272f
mov qword [rdi + 0x3e90], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x14001271c
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3e98], r15
mov qword [rdi + 0x3ed0], r15
mov rcx, qword [rdi + 0x3ea8]
test rcx, rcx
je 0x14001276e
mov qword [rdi + 0x3ea0], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x14001275b
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3ea8], r15
mov rcx, qword [rdi + 0x3eb8]
test rcx, rcx
je 0x1400127a6
mov qword [rdi + 0x3eb0], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012793
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x3eb8], r15
mov qword [rdi + 0x48b0], r15
mov qword [rdi + 0x3ee0], r15
mov qword [rdi + 0x3ed8], r15
mov qword [rdi + 0x3f68], r15
mov qword [rdi + 0x3f50], r15
mov qword [rdi + 0x3ee8], r15
lea rcx, [rdi + 0x4608]
call fcn.14000dd50
mov rcx, qword [rdi + 0x4820]
test rcx, rcx
je 0x140012814
mov qword [rdi + 0x4818], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012801
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4820], r15
mov rcx, qword [rdi + 0x4830]
test rcx, rcx
je 0x14001284c
mov qword [rdi + 0x4828], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012839
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4830], r15
mov rcx, qword [rdi + 0x4840]
test rcx, rcx
je 0x140012884
mov qword [rdi + 0x4838], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012871
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4840], r15
mov rcx, qword [rdi + 0x4880]
test rcx, rcx
je 0x1400128bc
mov qword [rdi + 0x4878], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x1400128a9
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4880], r15
mov rcx, qword [rdi + 0x4890]
test rcx, rcx
je 0x1400128f4
mov qword [rdi + 0x4888], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x1400128e1
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4890], r15
mov ebp, r15d
cmp dword [rdi + 0x48a0], r15d
jle 0x1400129d6
mov r14, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x48a8]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x1400129c4
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x140012956
mov rcx, rsi
call fcn.14000d960
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012947
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x140012989
mov rcx, rsi
call fcn.14000d960
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012979
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
mov rcx, rsi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
lea rcx, [rbx + 0x78]
lea r9, [0x14002adb0]
mov edx, reloc.WS2_32.dll_recv
lea r8d, [rdx - 0xe]
call fcn.14016bf70
nop
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x1400129b5
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x48a0]
jl 0x140012910
mov rcx, qword [rdi + 0x48a8]
test rcx, rcx
je 0x140012a0e
mov qword [rdi + 0x48a0], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x1400129fb
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x48a8], r15
lea rcx, [rdi + 0x4b88]
call fcn.14002adf0
mov rcx, qword [rdi + 0x4bb8]
test rcx, rcx
je 0x140012a52
mov qword [rdi + 0x4bb0], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012a3f
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bb8], r15
mov rcx, qword [rdi + 0x4bc8]
test rcx, rcx
je 0x140012a8a
mov qword [rdi + 0x4bc0], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012a77
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4bc8], r15
mov ebx, r15d
cmp dword [rdi + 0x4b08], r15d
jle 0x140012ade
mov rsi, r15
nop dword [rax]
mov rax, qword [rdi + 0x4b10]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x140012ad0
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012ac3
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4b08]
jl 0x140012aa0
mov rcx, qword [rdi + 0x4b10]
test rcx, rcx
je 0x140012b16
mov qword [rdi + 0x4b08], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012b03
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b10], r15
lea rcx, [rdi + 0x4b38]
call fcn.14002afe0
mov esi, r15d
cmp dword [rdi + 0x4b28], r15d
jle 0x140012b7c
mov rbp, r15
mov rbx, qword [rdi + 0x4b30]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.140033d10
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x140012b6e
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012b61
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4b28]
jl 0x140012b31
mov rcx, qword [rdi + 0x4b30]
test rcx, rcx
je 0x140012bb4
mov qword [rdi + 0x4b28], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012ba1
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b30], r15
mov rcx, qword [rdi + 0x4b78]
test rcx, rcx
je 0x140012bec
mov qword [rdi + 0x4b70], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012bd9
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4b78], r15
mov rcx, qword [rdi + 0x5b68]
test rcx, rcx
je 0x140012c24
mov qword [rdi + 0x5b60], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012c11
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b68], r15
mov rcx, qword [rdi + 0x5b78]
test rcx, rcx
je 0x140012c5c
mov qword [rdi + 0x5b70], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012c49
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5b78], r15
mov rcx, qword [rdi + 0x4c08]
test rcx, rcx
je 0x140012c94
mov qword [rdi + 0x4c00], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012c81
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c08], r15
mov rcx, qword [rdi + 0x4c18]
test rcx, rcx
je 0x140012ccc
mov qword [rdi + 0x4c10], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012cb9
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c18], r15
mov rcx, qword [rdi + 0x4c28]
test rcx, rcx
je 0x140012d04
mov qword [rdi + 0x4c20], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012cf1
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x4c28], r15
mov rcx, qword [rdi + 0x5bd0]
test rcx, rcx
je 0x140012d3c
mov qword [rdi + 0x5bc8], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012d29
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bd0], r15
mov rcx, qword [rdi + 0x5bc0]
test rcx, rcx
je 0x140012d74
mov qword [rdi + 0x5bb8], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012d61
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5bc0], r15
cmp qword [rdi + 0x5c40], 0
je 0x140012da5
mov rbx, qword [rdi + 0x5c40]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x140012d9e
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5c40], r15
mov rcx, qword [rdi + 0x5c50]
test rcx, rcx
je 0x140012ddd
mov qword [rdi + 0x5c48], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012dca
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c50], r15
mov rcx, qword [rdi + 0x5c88]
test rcx, rcx
je 0x140012e15
mov qword [rdi + 0x5c80], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012e02
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c88], r15
mov rcx, qword [rdi + 0x5c98]
test rcx, rcx
je 0x140012e4d
mov qword [rdi + 0x5c90], r15
mov rax, qword [0x1401fa3e0]
test rax, rax
je 0x140012e3a
dec dword [rax + 0xf4]
mov rdx, qword [0x1401fa3d0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rdi + 0x5c98], r15
mov dword [rdi + 0x5ca0], r15d
mov byte [rdi], 0
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret