Function at 0x140009210
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 rbx, rcx
mov rax, qword [rcx + 0xa8]
test rax, rax
je 0x1400092fa
cmp byte [rcx + 1], 0
je 0x1400092fa
mov byte [rax], 0
mov rdi, qword [rcx + 0xa8]
test rdi, rdi
je 0x1400092fa
mov rcx, rdi
call fcn.14002e680
nop
mov rcx, qword [rdi + 0x68]
test rcx, rcx
je 0x140009289
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000927c
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rdi + 0x58]
test rcx, rcx
je 0x1400092b1
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400092a4
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rcx, qword [rdi + 0x48]
test rcx, rcx
je 0x1400092d9
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400092cc
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400092eb
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor r15d, r15d
mov qword [rbx + 0xa8], r15
cmp byte [rbx], r15b
je 0x140009a26
cmp byte [rbx + 0x2fc0], r15b
je 0x14000937d
mov rdi, qword [rbx + 0x20]
test rdi, rdi
je 0x14000937d
mov rsi, qword [0x1401359c0]
mov qword [0x1401359c0], rbx
mov dword [rbx + 0x2fc4], r15d
mov qword [rsp + 0x40], r15
lea rcx, [rsp + 0x40]
call fcn.140018b40
mov rbp, rax
lea rdx, [0x1400cc1f4]
mov rcx, rdi
call fcn.1400040a0
mov rdi, rax
test rax, rax
je 0x140009384
mov r9, rax
mov r8, qword [rsp + 0x40]
lea edx, [r15 + 1]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x140009384
mov rsi, qword [0x1401359c0]
mov qword [0x1401359c0], rbx
call fcn.14001ae10
mov qword [0x1401359c0], rsi
mov esi, r15d
cmp dword [rbx + 0x2f88], r15d
jle 0x14000942d
mov rbp, r15
nop word [rax + rax]
mov rax, qword [rbx + 0x2f90]
mov rdi, qword [rax + rbp + 8]
test rdi, rdi
je 0x14000941f
mov rcx, qword [rdi + 0x38]
call fcn.1400239c0
mov qword [rdi + 0x38], r15
mov qword [rdi + 0x20], r15
mov qword [rdi + 0x18], r15
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x1400093fe
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400093f1
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
nop
mov rax, qword [0x1401359c0]
test rax, rax
je 0x140009410
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add rbp, 0x10
cmp esi, dword [rbx + 0x2f88]
jl 0x1400093b0
mov edi, r15d
cmp dword [rbx + 0x2ff8], r15d
jle 0x14000946f
mov rsi, r15
nop dword [rax]
mov r8, qword [rbx + 0x3000]
cmp dword [rsi + r8], 6
jne 0x140009461
movsxd rax, edi
lea rcx, [rax + rax*2]
lea rdx, [r8 + rcx*8]
mov rcx, rbx
call qword [rsi + rreloc.WS2_32.dll_htonl + 8]
inc edi
add rsi, 0x18
cmp edi, dword [rbx + 0x2ff8]
jl 0x140009440
mov esi, r15d
cmp dword [rbx + 0x1b40], r15d
jle 0x1400094c7
mov r14, r15
nop
mov rax, qword [rbx + 0x1b48]
mov rdi, qword [r14 + rax]
test rdi, rdi
je 0x1400094b9
mov rcx, rdi
call fcn.140006170
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400094aa
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
mov rcx, rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
inc esi
add r14, 8
cmp esi, dword [rbx + 0x1b40]
jl 0x140009480
mov rcx, qword [rbx + 0x1b48]
test rcx, rcx
je 0x1400094ff
mov qword [rbx + 0x1b40], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400094ec
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1b48], r15
mov rcx, qword [rbx + 0x1b58]
test rcx, rcx
je 0x140009537
mov qword [rbx + 0x1b50], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x140009524
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1b58], r15
mov rcx, qword [rbx + 0x1b68]
test rcx, rcx
je 0x14000956f
mov qword [rbx + 0x1b60], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000955c
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1b68], r15
mov qword [rbx + 0x1b98], r15
mov rcx, qword [rbx + 0x1b78]
test rcx, rcx
je 0x1400095ae
mov qword [rbx + 0x1b70], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000959b
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1b78], r15
mov rcx, qword [rbx + 0x1b88]
test rcx, rcx
je 0x1400095e6
mov qword [rbx + 0x1b80], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400095d3
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1b88], r15
mov qword [rbx + 0x1d78], r15
mov qword [rbx + 0x1bb0], r15
mov qword [rbx + 0x1ba8], r15
mov qword [rbx + 0x1ba0], r15
mov qword [rbx + 0x1c38], r15
mov qword [rbx + 0x1c20], r15
mov qword [rbx + 0x1bc0], r15
mov rcx, qword [rbx + 0x1cf8]
test rcx, rcx
je 0x14000964f
mov qword [rbx + 0x1cf0], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000963c
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1cf8], r15
mov rcx, qword [rbx + 0x1d08]
test rcx, rcx
je 0x140009687
mov qword [rbx + 0x1d00], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x140009674
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1d08], r15
mov rcx, qword [rbx + 0x1d18]
test rcx, rcx
je 0x1400096bf
mov qword [rbx + 0x1d10], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400096ac
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1d18], r15
mov rcx, qword [rbx + 0x1d28]
test rcx, rcx
je 0x1400096f7
mov qword [rbx + 0x1d20], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400096e4
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1d28], r15
mov rcx, qword [rbx + 0x1d38]
test rcx, rcx
je 0x14000972f
mov qword [rbx + 0x1d30], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000971c
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1d38], r15
mov qword [rbx + 0x1d68], r15
mov qword [rbx + 0x1d60], r15
mov qword [rbx + 0x1d58], r15
mov edi, r15d
cmp dword [rbx + 0x1d40], r15d
jle 0x14000977e
mov rsi, r15
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rbx + 0x1d48]
mov rcx, qword [rcx + rsi]
call fcn.1400238b0
inc edi
lea rsi, [rsi + 8]
cmp edi, dword [rbx + 0x1d40]
jl 0x140009760
mov rcx, qword [rbx + 0x1d48]
test rcx, rcx
je 0x1400097b6
mov qword [rbx + 0x1d40], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400097a3
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1d48], r15
lea rcx, [rbx + 0x1fa8]
call fcn.140022e10
mov rcx, qword [rbx + 0x1fd8]
test rcx, rcx
je 0x1400097fa
mov qword [rbx + 0x1fd0], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400097e7
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1fd8], r15
mov rcx, qword [rbx + 0x1fe8]
test rcx, rcx
je 0x140009832
mov qword [rbx + 0x1fe0], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000981f
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x1fe8], r15
mov rcx, qword [rbx + 0x2f50]
test rcx, rcx
je 0x14000986a
mov qword [rbx + 0x2f48], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x140009857
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x2f50], r15
mov rcx, qword [rbx + 0x2f60]
test rcx, rcx
je 0x1400098a2
mov qword [rbx + 0x2f58], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000988f
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x2f60], r15
mov rcx, qword [rbx + 0x2010]
test rcx, rcx
je 0x1400098da
mov qword [rbx + 0x2008], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400098c7
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x2010], r15
mov rcx, qword [rbx + 0x2020]
test rcx, rcx
je 0x140009912
mov qword [rbx + 0x2018], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400098ff
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x2020], r15
mov rcx, qword [rbx + 0x2030]
test rcx, rcx
je 0x14000994a
mov qword [rbx + 0x2028], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x140009937
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x2030], r15
mov rcx, qword [rbx + 0x2ff0]
test rcx, rcx
je 0x140009982
mov qword [rbx + 0x2fe8], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x14000996f
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x2ff0], r15
mov rcx, qword [rbx + 0x2fe0]
test rcx, rcx
je 0x1400099ba
mov qword [rbx + 0x2fd8], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x1400099a7
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x2fe0], r15
cmp qword [rbx + 0x3010], 0
je 0x1400099eb
mov rdi, qword [rbx + 0x3010]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rdi, rax
je 0x1400099e4
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rbx + 0x3010], r15
mov rcx, qword [rbx + 0x3020]
test rcx, rcx
je 0x140009a23
mov qword [rbx + 0x3018], r15
mov rax, qword [0x1401359c0]
test rax, rax
je 0x140009a10
dec dword [rax + 0x3b0]
mov rdx, qword [0x1401359b0]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov qword [rbx + 0x3020], r15
mov byte [rbx], 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