Function at 0x180006d30
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, rcx
mov rax, qword [rcx + 0x50]
test rax, rax
je 0x180006d88
cmp byte [rcx + 1], 0
je 0x180006d88
mov byte [rax + 0x18], 0
mov rbx, qword [rcx + 0x50]
test rbx, rbx
je 0x180006d88
mov rcx, rbx
call fcn.180022900
mov rax, qword [0x180209130]
test rax, rax
je 0x180006d7f
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 0x18000754d
cmp byte [rdi + 0x5339], r12b
je 0x180006e0e
mov rbx, qword [rdi + 0x20]
test rbx, rbx
je 0x180006e0e
mov rsi, qword [0x180209130]
mov qword [0x180209130], rdi
mov dword [rdi + 0x533c], r12d
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.180014640
mov rbp, rax
lea rdx, [0x18019fd88]
mov rcx, rbx
call fcn.180001f40
mov rbx, rax
test rax, rax
je 0x180006e07
mov r9, rax
mov r8, qword [rsp + 0x50]
mov edx, 1
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]
mov qword [0x180209130], rsi
mov ebx, r12d
cmp dword [rdi + 0x5380], r12d
jle 0x180006e50
mov rsi, r12
nop dword [rax]
mov rcx, qword [rdi + 0x5388]
cmp dword [rsi + rcx + 4], 6
jne 0x180006e42
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 + 0x5380]
jl 0x180006e20
mov esi, r12d
cmp dword [rdi + 0x3e08], r12d
jle 0x180006ea1
mov r14, r12
nop
mov rax, qword [rdi + 0x3e10]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x180006e93
mov rcx, rbx
call fcn.180003d40
mov rax, qword [0x180209130]
test rax, rax
je 0x180006e8a
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 + 0x3e08]
jl 0x180006e60
mov rcx, qword [rdi + 0x3e10]
test rcx, rcx
je 0x180006ed3
mov qword [rdi + 0x3e08], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180006ec6
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e10], r12
mov rcx, qword [rdi + 0x3e20]
test rcx, rcx
je 0x180006f05
mov qword [rdi + 0x3e18], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180006ef8
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e20], r12
mov rcx, qword [rdi + 0x3e30]
test rcx, rcx
je 0x180006f37
mov qword [rdi + 0x3e28], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180006f2a
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e30], r12
mov qword [rdi + 0x3e68], r12
mov rcx, qword [rdi + 0x3e40]
test rcx, rcx
je 0x180006f70
mov qword [rdi + 0x3e38], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180006f63
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e40], r12
mov rcx, qword [rdi + 0x3e50]
test rcx, rcx
je 0x180006fa2
mov qword [rdi + 0x3e48], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180006f95
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3e50], r12
mov qword [rdi + 0x4078], r12
mov qword [rdi + 0x3e78], r12
mov qword [rdi + 0x3e70], r12
mov qword [rdi + 0x3f08], r12
mov qword [rdi + 0x3ef0], r12
mov qword [rdi + 0x3e80], r12
mov rcx, qword [rdi + 0x3fe8]
test rcx, rcx
je 0x180006ffe
mov qword [rdi + 0x3fe0], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180006ff1
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3fe8], r12
mov rcx, qword [rdi + 0x3ff8]
test rcx, rcx
je 0x180007030
mov qword [rdi + 0x3ff0], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180007023
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x3ff8], r12
mov rcx, qword [rdi + 0x4008]
test rcx, rcx
je 0x180007062
mov qword [rdi + 0x4000], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180007055
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4008], r12
mov rcx, qword [rdi + 0x4048]
test rcx, rcx
je 0x180007094
mov qword [rdi + 0x4040], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180007087
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 0x1800070c6
mov qword [rdi + 0x4050], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800070b9
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4058], r12
mov ebp, r12d
cmp dword [rdi + 0x4068], r12d
jle 0x180007196
mov r14, r12
nop dword [rax]
mov rax, qword [rdi + 0x4070]
mov rbx, qword [r14 + rax]
test rbx, rbx
je 0x180007184
mov rsi, qword [rbx + 0x38]
test rsi, rsi
je 0x180007120
mov rcx, rsi
call fcn.180017640
mov rax, qword [0x180209130]
test rax, rax
je 0x180007117
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 0x18000714d
mov rcx, rsi
call fcn.180017640
mov rax, qword [0x180209130]
test rax, rax
je 0x180007143
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, [0x1800152a0]
mov edx, reloc.WS2_32.dll_recv
mov r8d, 2
call fcn.18013a0b8
nop
mov rax, qword [0x180209130]
test rax, rax
je 0x18000717b
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 + 0x4068]
jl 0x1800070e0
mov rcx, qword [rdi + 0x4070]
test rcx, rcx
je 0x1800071c8
mov qword [rdi + 0x4068], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800071bb
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4070], r12
lea rcx, [rdi + 0x4338]
call fcn.180016970
mov rcx, qword [rdi + 0x4368]
test rcx, rcx
je 0x180007206
mov qword [rdi + 0x4360], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800071f9
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4368], r12
mov rcx, qword [rdi + 0x4378]
test rcx, rcx
je 0x180007238
mov qword [rdi + 0x4370], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x18000722b
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4378], r12
mov ebx, r12d
cmp dword [rdi + 0x42b8], r12d
jle 0x180007288
mov rsi, r12
nop word [rax + rax]
mov rax, qword [rdi + 0x42c0]
mov rcx, qword [rsi + rax + 0x20]
test rcx, rcx
je 0x18000727a
mov rax, qword [0x180209130]
test rax, rax
je 0x180007273
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 + 0x42b8]
jl 0x180007250
mov rcx, qword [rdi + 0x42c0]
test rcx, rcx
je 0x1800072ba
mov qword [rdi + 0x42b8], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800072ad
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x42c0], r12
lea rcx, [rdi + 0x42e8]
call fcn.1800167c0
mov esi, r12d
cmp dword [rdi + 0x42d8], r12d
jle 0x180007325
mov rbp, r12
nop word [rax + rax]
mov rbx, qword [rdi + 0x42e0]
lea rcx, [rbx + 0x10]
add rcx, rbp
call fcn.1800223a0
nop
mov rcx, qword [rbx + rbp + 0x20]
test rcx, rcx
je 0x180007317
mov rax, qword [0x180209130]
test rax, rax
je 0x180007310
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 + 0x42d8]
jl 0x1800072e0
mov rcx, qword [rdi + 0x42e0]
test rcx, rcx
je 0x180007357
mov qword [rdi + 0x42d8], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x18000734a
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x42e0], r12
mov rcx, qword [rdi + 0x4328]
test rcx, rcx
je 0x180007389
mov qword [rdi + 0x4320], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x18000737c
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x4328], r12
mov rcx, qword [rdi + 0x5300]
test rcx, rcx
je 0x1800073bb
mov qword [rdi + 0x52f8], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800073ae
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5300], r12
mov rcx, qword [rdi + 0x5310]
test rcx, rcx
je 0x1800073ed
mov qword [rdi + 0x5308], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800073e0
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5310], r12
mov rcx, qword [rdi + 0x43a0]
test rcx, rcx
je 0x18000741f
mov qword [rdi + 0x4398], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180007412
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x43a0], r12
mov rcx, qword [rdi + 0x43b0]
test rcx, rcx
je 0x180007451
mov qword [rdi + 0x43a8], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180007444
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x43b0], r12
mov rcx, qword [rdi + 0x43c0]
test rcx, rcx
je 0x180007483
mov qword [rdi + 0x43b8], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x180007476
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x43c0], r12
mov rcx, qword [rdi + 0x5368]
test rcx, rcx
je 0x1800074b5
mov qword [rdi + 0x5360], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800074a8
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5368], r12
mov rcx, qword [rdi + 0x5358]
test rcx, rcx
je 0x1800074e7
mov qword [rdi + 0x5350], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x1800074da
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x5358], r12
cmp qword [rdi + 0x53a0], 0
je 0x180007518
mov rbx, qword [rdi + 0x53a0]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x180007511
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov qword [rdi + 0x53a0], r12
mov rcx, qword [rdi + 0x53b0]
test rcx, rcx
je 0x18000754a
mov qword [rdi + 0x53a8], r12
mov rax, qword [0x180209130]
test rax, rax
je 0x18000753d
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x53b0], 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