Function at 0x140041770
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x490
lea rbp, [rsp + 0x40]
mov rax, qword [rdx + 8]
mov r12, rcx
mov qword [rbp + 0x4a0], rbx
mov r15, r8
mov rdi, rdx
movzx r14d, byte [rax + 0x88]
mov ecx, r14d
test r14b, r14b
je 0x140041cdb
sub ecx, 1
je 0x140041a05
sub ecx, 1
je 0x14004183a
cmp ecx, 1
jne 0x140041cdb
mov r11, qword [r8 + 0x40]
xor esi, esi
mov rcx, qword [rdx + 8]
mov r10, qword [rdx + 8]
add rcx, 0x30
mov rax, qword [rbp + 0x4b0]
add r10, 0x20
movsxd r8, dword [rcx]
mov dword [rax], esi
add r8, rcx
mov rax, qword [rdx + 8]
movsxd rdx, dword [r10]
movsxd r9, dword [rax + 0x1c]
mov eax, esi
sub eax, dword [rcx]
mov rcx, r12
neg eax
sbb rax, rax
sub esi, dword [r10]
and r8, rax
add rdx, r10
neg esi
sbb rax, rax
and rdx, rax
mov rax, qword [r11 + 0xd0]
mov qword [rsp + 0x28], rax
mov rax, qword [r11 + 0x190]
mov qword [rsp + 0x20], rax
call fcn.140003200
jmp 0x140041d89
mov rcx, qword [rdx + 8]
xor esi, esi
movsxd rdx, dword [rcx + 0x30]
add rcx, 0x30
mov rax, qword [rbp + 0x4b0]
add rdx, rcx
xorps xmm0, xmm0
mov dword [rax], esi
mov rax, qword [r8 + 0x40]
mov r15, qword [rax + 0xd0]
mov eax, esi
sub eax, dword [rcx]
mov rcx, qword [rdi + 8]
neg eax
sbb rax, rax
and rdx, rax
mov eax, esi
movsxd rdi, dword [rcx]
sub eax, dword [rdx]
movsxd r13, dword [rdx]
add r13, rdx
lea rdx, [0x14007e9e4]
neg eax
sbb rax, rax
add rdi, rcx
and r13, rax
mov eax, esi
sub eax, dword [rcx]
mov rcx, r13
movups xmmword [r12], xmm0
neg eax
movups xmmword [r12 + 0x10], xmm0
sbb rax, rax
and rdi, rax
movups xmmword [r12 + 0x20], xmm0
call fcn.1400147a0
mov qword [rbp + 0x4a8], rax
test rax, rax
jne 0x14004193e
mov ecx, 0x2808
mov qword [r12 + 0x18], 0x2800
mov dword [r12 + 0x20], esi
call fcn.140053cb4
mov qword [rax], 0x2800
lock add qword [r15], 0x2800
add rax, 8
mov qword [r12 + 0x10], rax
mov byte [rax], sil
mov qword [r12 + 0x28], r15
call fcn.140052b04
mov ecx, dword [rax]
call fcn.140052b24
mov r9, r13
mov qword [rsp + 0x20], rax
lea r8, str.Error_opening_for_writing_the_file:__s__error:__s
mov edx, 0x400
lea rcx, [rbp + 0x50]
call fcn.1400031a0
lea rax, [rbp + 0x50]
mov r14, 0xffffffffffffffff
nop
inc r14
cmp byte [rax + r14], sil
jne 0x140041930
jmp 0x1400419e9
mov r14, 0xffffffffffffffff
mov rbx, r14
nop dword [rax + rax]
inc rbx
cmp byte [rdi + rbx], sil
jne 0x140041950
movsxd r8, ebx
mov r9, rax
mov edx, 1
mov rcx, rdi
call fcn.1400529c8
mov rcx, qword [rbp + 0x4a8]
mov rdi, rax
call fcn.140052714
cmp edi, ebx
je 0x140041d89
mov ecx, 0x2808
mov qword [r12 + 0x18], 0x2800
mov dword [r12 + 0x20], esi
call fcn.140053cb4
mov qword [rax], 0x2800
lock add qword [r15], 0x2800
add rax, 8
mov dword [rsp + 0x28], edi
mov qword [r12 + 0x10], rax
lea r8, str.fwrite_was_supposed_to_write__d_bytes_to__s__but_wrote__d_bytes
mov r9d, ebx
mov qword [rsp + 0x20], r13
mov edx, 0x400
lea rcx, [rbp + 0x50]
mov byte [rax], sil
mov qword [r12 + 0x28], r15
call fcn.1400031a0
lea rax, [rbp + 0x50]
inc r14
cmp byte [rax + r14], sil
jne 0x1400419e0
mov r8, r14
lea rdx, [rbp + 0x50]
mov rcx, r12
call fcn.140023b10
mov dword [r12], 1
jmp 0x140041d89
movsxd r14, dword [rax + 0x54]
mov rax, r14
shl rax, 4
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140041a23
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1400488d0
sub rsp, rcx
xor esi, esi
lea r13, [rsp + 0x40]
test r14d, r14d
jle 0x140041ace
mov r9d, esi
mov r10, r13
nop dword [rax + rax]
mov rcx, qword [rdi + 8]
lea r8, [r9*8]
add rcx, 0x58
lea r10, [r10 + 0x10]
mov eax, esi
sub eax, dword [rcx]
movsxd rdx, dword [rcx]
add rdx, rcx
neg eax
sbb rax, rax
and rdx, rax
mov eax, esi
add rdx, r8
sub eax, dword [rdx]
movsxd rcx, dword [rdx]
add rcx, rdx
neg eax
sbb rax, rax
and rcx, rax
mov eax, esi
mov qword [r10 - 0x10], rcx
mov rcx, qword [rdi + 8]
add rcx, 0x58
sub eax, dword [rcx]
movsxd rdx, dword [rcx]
add rdx, rcx
neg eax
sbb rax, rax
and rdx, rax
mov eax, esi
lea rcx, [rdx + 4]
add rcx, r8
sub eax, dword [rcx]
movsxd rdx, dword [rcx]
add rdx, rcx
neg eax
sbb rax, rax
inc r9
and rdx, rax
mov qword [r10 - 8], rdx
cmp r9, r14
jl 0x140041a50
mov rax, qword [rdi + 8]
lea rcx, [rbp + 0x4a8]
mov qword [rbp + 8], rax
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140041da6
mov rax, qword [rbp + 0x4a8]
xor edx, edx
sub rax, qword [0x14008eac8]
mov r9, r13
mov rcx, qword [rdi + 8]
mov r8d, r14d
mov ebx, dword [r15 + 0x38]
imul rax, rax, 0xf4240
dec ebx
div qword [0x14008eac0]
add rax, qword [0x14008ead0]
mov qword [rbp + 0x10], rax
mov rax, qword [r15 + 0x40]
mov qword [rbp + 0x18], rax
movsxd r10, dword [rcx]
add r10, rcx
mov r11, qword [rax + 0xd0]
mov eax, esi
sub eax, dword [rcx]
lea rcx, [rbp + 0x20]
neg eax
lea rax, [rbp + 8]
mov qword [rsp + 0x38], rax
sbb rdx, rdx
lea rax, [0x140041760]
and rdx, r10
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], r11
call fcn.140024250
movups xmm0, xmmword [rax]
movups xmmword [r12], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [r12 + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [r12 + 0x20], xmm0
mov rdx, qword [rdi + 8]
mov qword [rbp + 0x498], rdx
mov eax, dword [rdx + 0x88]
shr eax, 0xa
and al, 1
mov dword [rbp + 0x4a8], eax
je 0x140041baf
cmp dword [rdx + 0x4c], esi
je 0x140041ccd
mov rcx, qword [r12 + 0x10]
movzx eax, byte [rcx]
test al, al
je 0x140041ccd
nop
cmp al, 0xd
je 0x140041bc8
cmp al, 0xa
jne 0x140041be1
movzx eax, byte [rcx + 1]
inc rcx
test al, al
jne 0x140041bc0
mov rax, qword [rbp + 0x4b0]
mov dword [rax], esi
jmp 0x140041d89
mov r13d, esi
cmp dword [rdx + 0x4c], esi
je 0x140041cc0
lea r8, [rdx + 0x50]
mov rcx, rsi
mov qword [rbp], r8
mov r14, 0xffffffffffffffff
mov qword [rbp + 0x490], rcx
nop word [rax + rax]
movsxd rdx, dword [r8]
mov eax, esi
sub eax, dword [r8]
add rdx, r8
mov rbx, qword [r12 + 0x10]
neg eax
sbb rax, rax
and rdx, rax
add rdx, rcx
movsxd rcx, dword [rdx]
add rcx, rdx
cmp dword [rdx], esi
cmove rcx, rsi
call fcn.140045f70
mov r15, rax
test rax, rax
je 0x140041c62
cmp byte [rax], 2
jne 0x140041c8a
lea rcx, [rax + 0x10]
mov rdx, rbx
call fcn.140046590
neg eax
sbb edi, edi
neg edi
dec edi
cmp edi, r14d
jne 0x140041cad
mov rcx, qword [rbp + 0x490]
inc r13d
mov rax, qword [rbp + 0x498]
add rcx, 4
mov qword [rbp + 0x490], rcx
cmp r13d, dword [rax + 0x4c]
je 0x140041cc0
mov r8, qword [rbp]
jmp 0x140041c10
mov edi, r14d
nop dword [rax]
mov rdx, rbx
mov rcx, r15
inc edi
call fcn.140046590
test eax, eax
jne 0x140041c5d
movzx eax, byte [rbx]
inc rbx
test al, al
jne 0x140041c90
jmp 0x140041c62
mov rax, qword [rbp + 0x4b0]
mov esi, 1
mov dword [rax], esi
jmp 0x140041d89
movzx eax, byte [rbp + 0x4a8]
xor eax, 1
lea esi, [rax + rax]
mov rax, qword [rbp + 0x4b0]
mov dword [rax], esi
jmp 0x140041d89
mov rax, qword [rbp + 0x4b0]
xor esi, esi
mov ecx, 0x2808
mov dword [rax], esi
mov rax, qword [r8 + 0x40]
mov rbx, qword [rax + 0xd0]
mov qword [r12 + 0x18], 0x2800
mov dword [r12 + 0x20], esi
call fcn.140053cb4
mov qword [rax], 0x2800
lock add qword [rbx], 0x2800
add rax, 8
mov qword [r12 + 0x10], rax
mov byte [rax], sil
mov qword [r12 + 0x28], rbx
cmp r14, 4
jb 0x140041d38
mov rax, qword [str._unknown_]
jmp 0x140041d43
lea rcx, str._unknown_
mov rax, qword [rcx + r14*8]
mov r9d, r14d
mov qword [rsp + 0x20], rax
lea r8, str.Unknown_action_type__d___s_
mov edx, 0x400
lea rcx, [rbp + 0x50]
call fcn.1400031a0
mov r14, 0xffffffffffffffff
lea rax, [rbp + 0x50]
mov r8, r14
nop
inc r8
cmp byte [rax + r8], sil
jne 0x140041d70
lea rdx, [rbp + 0x50]
mov rcx, r12
call fcn.140023b10
mov dword [r12], r14d
mov rbx, qword [rbp + 0x4a0]
mov rax, r12
lea rsp, [rbp + 0x450]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, str.QueryPerformanceCounter_failed
call fcn.1400139a0
int3