Function at 0x140008140
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x30
mov rax, qword [rcx + 0xa8]
mov rdi, rcx
test rax, rax
je 0x1400081ff
cmp byte [rcx + 1], 0
je 0x1400081ff
mov byte [rax], 0
mov rbx, qword [rcx + 0xa8]
test rbx, rbx
je 0x1400081ff
mov rcx, rbx
call fcn.14002c0f0
mov rcx, qword [rbx + 0x68]
test rcx, rcx
je 0x1400081a2
mov rax, qword [0x1400cc200]
test rax, rax
je 0x14000819c
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x1400081c3
mov rax, qword [0x1400cc200]
test rax, rax
je 0x1400081bd
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbx + 0x48]
test rcx, rcx
je 0x1400081e4
mov rax, qword [0x1400cc200]
test rax, rax
je 0x1400081de
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [0x1400cc200]
test rax, rax
je 0x1400081f6
dec dword [rax + 0x3b0]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r15d, r15d
mov qword [rdi + 0xa8], r15
cmp byte [rdi], r15b
je 0x140008a15
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], r12
cmp byte [rdi + 0x2fc0], r15b
je 0x140008291
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x140008291
mov rsi, qword [0x1400cc200]
lea rcx, [rsp + 0x50]
mov qword [0x1400cc200], rdi
mov dword [rdi + 0x2fc4], r15d
mov qword [rsp + 0x50], r15
call fcn.140016770
lea rdx, [0x1400b5f54]
mov rcx, rbx
mov rbp, rax
call fcn.140003070
mov rbx, rax
test rax, rax
je 0x140008298
mov r8, qword [rsp + 0x50]
lea edx, [r15 + 1]
mov r9, rax
mov rcx, rbp
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]
jmp 0x140008298
mov rsi, qword [0x1400cc200]
mov qword [0x1400cc200], rdi
call fcn.140018a30
mov qword [0x1400cc200], rsi
mov esi, r15d
cmp dword [rdi + 0x2f88], r15d
jle 0x140008302
mov rbp, r15
nop word [rax + rax]
mov rax, qword [rdi + 0x2f90]
mov rbx, qword [rax + rbp + 8]
test rbx, rbx
je 0x1400082f4
mov rcx, rbx
call fcn.140019d20
mov rax, qword [0x1400cc200]
test rax, rax
je 0x1400082eb
dec dword [rax + 0x3b0]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
add rbp, 0x10
cmp esi, dword [rdi + 0x2f88]
jl 0x1400082c0
mov ebx, r15d
cmp dword [rdi + 0x2ff8], r15d
jle 0x140008340
mov rsi, r15
mov r8, qword [rdi + 0x3000]
cmp dword [rsi + r8], 6
jne 0x140008332
movsxd rax, ebx
lea rcx, [rax + rax*2]
lea rdx, [r8 + rcx*8]
mov rcx, rdi
call qword [rsi + rreloc.WS2_32.dll_htonl + 8]
inc ebx
add rsi, 0x18
cmp ebx, dword [rdi + 0x2ff8]
jl 0x140008311
mov r12d, r15d
cmp dword [rdi + 0x1b40], r15d
jle 0x1400084dd
mov qword [rsp + 0x28], r13
mov r13, r15
mov qword [rsp + 0x20], r14
nop dword [rax]
mov rax, qword [rdi + 0x1b48]
mov rsi, qword [rax + r13]
test rsi, rsi
je 0x1400084bf
mov rcx, qword [rsi]
test rcx, rcx
je 0x140008394
mov rax, qword [0x1400cc200]
test rax, rax
je 0x14000838e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp dword [rsi + 0x2f8], 0
mov r14d, r15d
je 0x140008420
mov rbp, r15
nop word [rax + rax]
mov r15, qword [rsi + 0x300]
lea rbx, [r15 + rbp]
lea rcx, [rbx + 0x70]
call fcn.14002b5b0
mov rcx, qword [rbx + 0x80]
test rcx, rcx
je 0x1400083e8
mov rax, qword [0x1400cc200]
test rax, rax
je 0x1400083e2
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [r15 + rbp + 0x68]
test rcx, rcx
je 0x14000840a
mov rax, qword [0x1400cc200]
test rax, rax
je 0x140008404
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc r14d
add rbp, 0x88
cmp r14d, dword [rsi + 0x2f8]
jne 0x1400083b0
xor r15d, r15d
lea rcx, [rsi + 0x320]
call fcn.140001510
mov rcx, qword [rsi + 0x300]
test rcx, rcx
je 0x140008450
mov rax, qword [0x1400cc200]
test rax, rax
je 0x14000844a
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsi + 0x2f0]
test rcx, rcx
je 0x140008474
mov rax, qword [0x1400cc200]
test rax, rax
je 0x14000846e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rsi + 0x118]
call fcn.140005190
mov rcx, qword [rsi + 0x110]
test rcx, rcx
je 0x1400084a4
mov rax, qword [0x1400cc200]
test rax, rax
je 0x14000849e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [0x1400cc200]
test rax, rax
je 0x1400084b6
dec dword [rax + 0x3b0]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc r12d
add r13, 8
cmp r12d, dword [rdi + 0x1b40]
jl 0x140008360
mov r14, qword [rsp + 0x20]
mov r13, qword [rsp + 0x28]
mov rcx, qword [rdi + 0x1b48]
mov r12, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x58]
test rcx, rcx
je 0x14000851d
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1b40], 0
test rax, rax
je 0x140008510
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1b48], r15
mov rcx, qword [rdi + 0x1b58]
test rcx, rcx
je 0x140008553
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1b50], 0
test rax, rax
je 0x140008546
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1b58], r15
mov rcx, qword [rdi + 0x1b68]
test rcx, rcx
je 0x140008589
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1b60], 0
test rax, rax
je 0x14000857c
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1b68], r15
mov qword [rdi + 0x1b98], r15
mov rcx, qword [rdi + 0x1b78]
test rcx, rcx
je 0x1400085c6
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1b70], 0
test rax, rax
je 0x1400085b9
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1b78], r15
mov rcx, qword [rdi + 0x1b88]
test rcx, rcx
je 0x1400085fc
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1b80], 0
test rax, rax
je 0x1400085ef
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1b88], r15
mov qword [rdi + 0x1d78], r15
mov qword [rdi + 0x1bb0], r15
mov qword [rdi + 0x1ba8], r15
mov qword [rdi + 0x1ba0], r15
mov qword [rdi + 0x1c38], r15
mov qword [rdi + 0x1c20], r15
mov qword [rdi + 0x1bc0], r15
mov rcx, qword [rdi + 0x1cf8]
test rcx, rcx
je 0x140008663
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1cf0], 0
test rax, rax
je 0x140008656
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1cf8], r15
mov rcx, qword [rdi + 0x1d08]
test rcx, rcx
je 0x140008699
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1d00], 0
test rax, rax
je 0x14000868c
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d08], r15
mov rcx, qword [rdi + 0x1d18]
test rcx, rcx
je 0x1400086cf
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1d10], 0
test rax, rax
je 0x1400086c2
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d18], r15
mov rcx, qword [rdi + 0x1d28]
test rcx, rcx
je 0x140008705
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1d20], 0
test rax, rax
je 0x1400086f8
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d28], r15
mov rcx, qword [rdi + 0x1d38]
test rcx, rcx
je 0x14000873b
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1d30], 0
test rax, rax
je 0x14000872e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d38], r15
cmp dword [rdi + 0x1d40], 0
mov ebx, r15d
mov qword [rdi + 0x1d68], r15
mov qword [rdi + 0x1d60], r15
mov qword [rdi + 0x1d58], r15
jle 0x14000877e
mov rsi, r15
nop
mov rcx, qword [rdi + 0x1d48]
mov rcx, qword [rsi + rcx]
call fcn.140021250
inc ebx
lea rsi, [rsi + 8]
cmp ebx, dword [rdi + 0x1d40]
jl 0x140008760
mov rcx, qword [rdi + 0x1d48]
mov rsi, qword [rsp + 0x60]
test rcx, rcx
je 0x1400087b9
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1d40], 0
test rax, rax
je 0x1400087ac
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1d48], r15
lea rcx, [rdi + 0x1fa8]
call fcn.140020870
mov rcx, qword [rdi + 0x1fd8]
test rcx, rcx
je 0x1400087fb
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1fd0], 0
test rax, rax
je 0x1400087ee
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1fd8], r15
mov rcx, qword [rdi + 0x1fe8]
test rcx, rcx
je 0x140008831
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x1fe0], 0
test rax, rax
je 0x140008824
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x1fe8], r15
mov rcx, qword [rdi + 0x2f50]
test rcx, rcx
je 0x140008867
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x2f48], 0
test rax, rax
je 0x14000885a
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2f50], r15
mov rcx, qword [rdi + 0x2f60]
test rcx, rcx
je 0x14000889d
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x2f58], 0
test rax, rax
je 0x140008890
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2f60], r15
mov rcx, qword [rdi + 0x2010]
test rcx, rcx
je 0x1400088d3
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x2008], 0
test rax, rax
je 0x1400088c6
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2010], r15
mov rcx, qword [rdi + 0x2020]
test rcx, rcx
je 0x140008909
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x2018], 0
test rax, rax
je 0x1400088fc
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2020], r15
mov rcx, qword [rdi + 0x2030]
test rcx, rcx
je 0x14000893f
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x2028], 0
test rax, rax
je 0x140008932
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2030], r15
mov rcx, qword [rdi + 0x2ff0]
test rcx, rcx
je 0x140008975
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x2fe8], 0
test rax, rax
je 0x140008968
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2ff0], r15
mov rcx, qword [rdi + 0x2fe0]
test rcx, rcx
je 0x1400089ab
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x2fd8], 0
test rax, rax
je 0x14000899e
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x2fe0], r15
cmp qword [rdi + 0x3010], 0
je 0x1400089dc
mov rbx, qword [rdi + 0x3010]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x1400089d5
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x3010], r15
mov rcx, qword [rdi + 0x3020]
test rcx, rcx
je 0x140008a12
mov rax, qword [0x1400cc200]
mov qword [rdi + 0x3018], 0
test rax, rax
je 0x140008a05
dec dword [rax + 0x3b0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3020], r15
mov byte [rdi], 0
add rsp, 0x30
pop r15
pop rdi
pop rbx
ret