Function at 0x140008500
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rdi, qword [0x1400eda20]
mov rax, qword [rdi + 0x50]
test rax, rax
je 0x14000855c
cmp byte [rdi + 1], 0
je 0x14000855c
mov byte [rax + 0x18], 0
mov rbx, qword [rdi + 0x50]
test rbx, rbx
je 0x14000855c
mov rcx, rbx
call fcn.140023970
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008553
dec dword [rax + 0xec]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r12d, r12d
mov qword [rdi + 0x50], r12
cmp byte [rdi], r12b
je 0x140008d4f
cmp byte [rdi + 0x5399], r12b
je 0x1400085d4
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x1400085d4
mov rax, qword [0x1400eda20]
mov dword [rax + 0x539c], r12d
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.140016690
mov rsi, rax
lea rdx, [0x1400b3a98]
mov rcx, rbx
call fcn.1400031f0
mov rbx, rax
test rax, rax
je 0x1400085d4
mov r9, rax
mov r8, qword [rsp + 0x50]
lea edx, [r12 + 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 ebx, r12d
cmp dword [rdi + 0x53e0], r12d
jle 0x140008620
mov rsi, r12
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rdi + 0x53e8]
cmp dword [rsi + rcx + 4], 6
jne 0x140008612
mov rax, qword [rsi + rcx + 0x10]
movsxd rdx, ebx
shl rdx, 5
add rdx, rcx
mov rcx, rdi
call rax
inc ebx
add rsi, 0x20
cmp ebx, dword [rdi + 0x53e0]
jl 0x1400085f0
mov esi, r12d
cmp dword [rdi + 0x3e68], r12d
jle 0x140008671
mov r14, r12
nop
mov rax, qword [rdi + 0x3e70]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140008663
mov rcx, rbx
call fcn.140005430
mov rax, qword [0x1400eda20]
test rax, rax
je 0x14000865a
dec dword [rax + 0xec]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
add r14, 8
cmp esi, dword [rdi + 0x3e68]
jl 0x140008630
mov rcx, qword [rdi + 0x3e70]
test rcx, rcx
je 0x1400086a3
mov qword [rdi + 0x3e68], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008696
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e70], r12
mov rcx, qword [rdi + 0x3e80]
test rcx, rcx
je 0x1400086d5
mov qword [rdi + 0x3e78], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x1400086c8
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e80], r12
mov rcx, qword [rdi + 0x3e90]
test rcx, rcx
je 0x140008707
mov qword [rdi + 0x3e88], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x1400086fa
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e90], r12
mov qword [rdi + 0x3ec8], r12
mov rcx, qword [rdi + 0x3ea0]
test rcx, rcx
je 0x140008740
mov qword [rdi + 0x3e98], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008733
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3ea0], r12
mov rcx, qword [rdi + 0x3eb0]
test rcx, rcx
je 0x140008772
mov qword [rdi + 0x3ea8], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008765
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3eb0], r12
mov qword [rdi + 0x40d8], r12
mov qword [rdi + 0x3ed8], r12
mov qword [rdi + 0x3ed0], r12
mov qword [rdi + 0x3f48], r12
mov qword [rdi + 0x3f30], r12
mov qword [rdi + 0x3ee0], r12
mov rcx, qword [rdi + 0x4048]
test rcx, rcx
je 0x1400087ce
mov qword [rdi + 0x4040], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x1400087c1
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4048], r12
mov rcx, qword [rdi + 0x4058]
test rcx, rcx
je 0x140008800
mov qword [rdi + 0x4050], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x1400087f3
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4058], r12
mov rcx, qword [rdi + 0x4068]
test rcx, rcx
je 0x140008832
mov qword [rdi + 0x4060], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008825
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4068], r12
mov rcx, qword [rdi + 0x40a8]
test rcx, rcx
je 0x140008864
mov qword [rdi + 0x40a0], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008857
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x40a8], r12
mov rcx, qword [rdi + 0x40b8]
test rcx, rcx
je 0x140008896
mov qword [rdi + 0x40b0], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008889
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x40b8], r12
mov ebp, r12d
cmp dword [rdi + 0x40c8], r12d
jle 0x140008964
mov r14, r12
nop dword [rax]
mov rax, qword [rdi + 0x40d0]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x140008952
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x1400088f0
mov rcx, rsi
call fcn.140001760
mov rax, qword [0x1400eda20]
test rax, rax
je 0x1400088e7
dec dword [rax + 0xec]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x14000891d
mov rcx, rsi
call fcn.140001760
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008913
dec dword [rax + 0xec]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rcx, [rbx + 0x78]
lea r9, [0x140017380]
mov edx, reloc.WS2_32.dll_recv
lea r8d, [rdx - 0xe]
call fcn.14009fffc
nop
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008949
dec dword [rax + 0xec]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc ebp
add r14, 8
cmp ebp, dword [rdi + 0x40c8]
jl 0x1400088b0
mov rcx, qword [rdi + 0x40d0]
test rcx, rcx
je 0x140008996
mov qword [rdi + 0x40c8], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008989
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x40d0], r12
lea rcx, [rdi + 0x4398]
call fcn.1400173b0
mov rcx, qword [rdi + 0x43c8]
test rcx, rcx
je 0x1400089d4
mov qword [rdi + 0x43c0], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x1400089c7
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x43c8], r12
mov rcx, qword [rdi + 0x43d8]
test rcx, rcx
je 0x140008a06
mov qword [rdi + 0x43d0], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x1400089f9
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x43d8], r12
mov ebx, r12d
cmp dword [rdi + 0x4318], r12d
jle 0x140008a58
mov rsi, r12
nop word [rax + rax]
mov rax, qword [rdi + 0x4320]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x140008a4a
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008a43
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc ebx
add rsi, 0x28
cmp ebx, dword [rdi + 0x4318]
jl 0x140008a20
mov rcx, qword [rdi + 0x4320]
test rcx, rcx
je 0x140008a8a
mov qword [rdi + 0x4318], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008a7d
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4320], r12
lea rcx, [rdi + 0x4348]
call fcn.140017520
mov esi, r12d
cmp dword [rdi + 0x4338], r12d
jle 0x140008af5
mov rbp, r12
nop word [rax + rax]
mov rbx, qword [rdi + 0x4340]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.1400233c0
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x140008ae7
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008ae0
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
inc esi
add rbp, 0x70
cmp esi, dword [rdi + 0x4338]
jl 0x140008ab0
mov rcx, qword [rdi + 0x4340]
test rcx, rcx
je 0x140008b27
mov qword [rdi + 0x4338], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008b1a
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4340], r12
mov rcx, qword [rdi + 0x4388]
test rcx, rcx
je 0x140008b59
mov qword [rdi + 0x4380], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008b4c
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4388], r12
mov rcx, qword [rdi + 0x5360]
test rcx, rcx
je 0x140008b8b
mov qword [rdi + 0x5358], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008b7e
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5360], r12
mov rcx, qword [rdi + 0x5370]
test rcx, rcx
je 0x140008bbd
mov qword [rdi + 0x5368], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008bb0
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5370], r12
mov rcx, qword [rdi + 0x4400]
test rcx, rcx
je 0x140008bef
mov qword [rdi + 0x43f8], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008be2
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4400], r12
mov rcx, qword [rdi + 0x4410]
test rcx, rcx
je 0x140008c21
mov qword [rdi + 0x4408], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008c14
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4410], r12
mov rcx, qword [rdi + 0x4420]
test rcx, rcx
je 0x140008c53
mov qword [rdi + 0x4418], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008c46
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4420], r12
mov rcx, qword [rdi + 0x53c8]
test rcx, rcx
je 0x140008c85
mov qword [rdi + 0x53c0], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008c78
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x53c8], r12
mov rcx, qword [rdi + 0x53b8]
test rcx, rcx
je 0x140008cb7
mov qword [rdi + 0x53b0], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008caa
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x53b8], r12
cmp qword [rdi + 0x5400], 0
je 0x140008ce8
mov rbx, qword [rdi + 0x5400]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x140008ce1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x5400], r12
mov rcx, qword [rdi + 0x5410]
test rcx, rcx
je 0x140008d1a
mov qword [rdi + 0x5408], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008d0d
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5410], r12
mov rcx, qword [rdi + 0x5448]
test rcx, rcx
je 0x140008d4c
mov qword [rdi + 0x5440], r12
mov rax, qword [0x1400eda20]
test rax, rax
je 0x140008d3f
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5448], r12
mov byte [rdi], 0
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret