Function at 0x140003510
Capabilities:
Delete file

Disassembly:
sub rsp, 0x78
mov rax, qword [0x14004c138]
test rax, rax
je 0x140003d1a
cmp dword [rax + 0x2c], 1
jb 0x140003d1a
mov qword [rsp + 0x90], rbx
xor ebx, ebx
call fcn.140002fc0
test eax, eax
jne 0x140003550
xor eax, eax
mov rbx, qword [rsp + 0x90]
add rsp, 0x78
ret
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x60], rdi
mov rdi, qword [0x14004c1a0]
mov qword [rsp + 0x58], r12
mov r12d, dword [0x14004c190]
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r15
movaps xmmword [rsp + 0x30], xmm6
movaps xmmword [rsp + 0x20], xmm7
mov r15, qword [0x14004c1a8]
xor r9d, r9d
xor r14d, r14d
cmp r12d, 4
jl 0x140003720
lea r13d, [r12 - 3]
lea esi, [r12 - 1]
lea r10d, [r9 + 2]
lea r14d, [r13 - 1]
lea r8, [r15 + 8]
shr r14d, 2
add r14d, 1
shl r14, 2
cmp r9d, esi
jge 0x140003615
mov eax, dword [r8 - 8]
lea rdx, [rax + rax*4]
mov eax, dword [r8 - 4]
movzx ebp, word [rdi + rdx*4 + 0xc]
lea rcx, [rax + rax*4]
mov r11d, dword [rdi + rcx*4 + 8]
mov eax, r11d
sub eax, dword [rdi + rdx*4 + 8]
cmp ebp, eax
jge 0x140003612
mov eax, dword [r8 - 8]
cvtsi2sd xmm0, ebp
lea rcx, [rax + rax*4]
sub r11d, dword [rdi + rcx*4 + 8]
cvtsi2sd xmm1, r11d
divsd xmm1, xmm0
cvttsd2si rax, xmm1
lea ebx, [rbx + rax*2]
jmp 0x140003615
add ebx, 2
lea eax, [r10 - 1]
cmp eax, esi
jge 0x140003668
mov eax, dword [r8 - 4]
lea rdx, [rax + rax*4]
mov eax, dword [r8]
movzx ebp, word [rdi + rdx*4 + 0xc]
lea rcx, [rax + rax*4]
mov r11d, dword [rdi + rcx*4 + 8]
mov eax, r11d
sub eax, dword [rdi + rdx*4 + 8]
cmp ebp, eax
jge 0x140003665
mov eax, dword [r8 - 4]
cvtsi2sd xmm0, ebp
lea rcx, [rax + rax*4]
sub r11d, dword [rdi + rcx*4 + 8]
cvtsi2sd xmm1, r11d
divsd xmm1, xmm0
cvttsd2si rax, xmm1
lea ebx, [rbx + rax*2]
jmp 0x140003668
add ebx, 2
cmp r10d, esi
jge 0x1400036b7
mov eax, dword [r8]
lea rdx, [rax + rax*4]
mov eax, dword [r8 + 4]
movzx ebp, word [rdi + rdx*4 + 0xc]
lea rcx, [rax + rax*4]
mov r11d, dword [rdi + rcx*4 + 8]
mov eax, r11d
sub eax, dword [rdi + rdx*4 + 8]
cmp ebp, eax
jge 0x1400036b4
mov eax, dword [r8]
cvtsi2sd xmm0, ebp
lea rcx, [rax + rax*4]
sub r11d, dword [rdi + rcx*4 + 8]
cvtsi2sd xmm1, r11d
divsd xmm1, xmm0
cvttsd2si rax, xmm1
lea ebx, [rbx + rax*2]
jmp 0x1400036b7
add ebx, 2
lea eax, [r10 + 1]
cmp eax, esi
jge 0x14000370b
mov eax, dword [r8 + 4]
lea rdx, [rax + rax*4]
mov eax, dword [r8 + 8]
movzx ebp, word [rdi + rdx*4 + 0xc]
lea rcx, [rax + rax*4]
mov r11d, dword [rdi + rcx*4 + 8]
mov eax, r11d
sub eax, dword [rdi + rdx*4 + 8]
cmp ebp, eax
jge 0x140003708
mov eax, dword [r8 + 4]
cvtsi2sd xmm0, ebp
lea rcx, [rax + rax*4]
sub r11d, dword [rdi + rcx*4 + 8]
cvtsi2sd xmm1, r11d
divsd xmm1, xmm0
cvttsd2si rax, xmm1
lea ebx, [rbx + rax*2]
jmp 0x14000370b
add ebx, 2
add r9d, 4
add r8, 0x10
add r10d, 4
cmp r9d, r13d
jl 0x1400035c4
cmp r9d, r12d
jge 0x14000378d
lea esi, [r12 - 1]
lea r8, [r15 + r14*4]
cmp r9d, esi
jge 0x140003780
mov eax, dword [r8]
lea rdx, [rax + rax*4]
mov eax, dword [r8 + 4]
movzx r11d, word [rdi + rdx*4 + 0xc]
lea rcx, [rax + rax*4]
mov r10d, dword [rdi + rcx*4 + 8]
mov eax, r10d
sub eax, dword [rdi + rdx*4 + 8]
cmp r11d, eax
jge 0x14000377d
mov eax, dword [r8]
cvtsi2sd xmm0, r11d
lea rcx, [rax + rax*4]
sub r10d, dword [rdi + rcx*4 + 8]
cvtsi2sd xmm1, r10d
divsd xmm1, xmm0
cvttsd2si rax, xmm1
lea ebx, [rbx + rax*2]
jmp 0x140003780
add ebx, 2
add r9d, 1
add r8, 4
cmp r9d, r12d
jl 0x14000372e
mov ebp, dword [0x14004c18c]
movsd xmm6, qword [0x140038f50]
movsd xmm7, qword [0x140038f48]
xor r10d, r10d
test ebp, ebp
je 0x140003887
mov esi, dword [0x14004c188]
lea r13d, [rbp - 1]
lea r8, [rdi + 0xc]
nop
mov r11d, dword [r8 - 8]
cmp r11d, esi
je 0x1400037f7
test r12d, r12d
jle 0x1400037f7
mov rdi, r15
mov r9, r12
cmp r10d, dword [rdi]
jne 0x1400037ed
movzx ecx, word [r8 + 4]
mov eax, r11d
sub eax, esi
lea eax, [rax + rax*4]
add eax, eax
cdq
idiv ecx
add ebx, eax
add rdi, 4
sub r9, 1
jne 0x1400037d4
cmp r10d, r13d
jae 0x14000386d
movzx ecx, word [r8]
movzx edi, word [r8 + 0x14]
mov eax, dword [r8 - 4]
sub eax, dword [r8 + 0x10]
cdq
xor eax, edx
sub eax, edx
cmp ecx, edi
cmovl edi, ecx
cvtsi2sd xmm0, edi
mulsd xmm0, xmm6
addsd xmm0, xmm7
cvttsd2si ecx, xmm0
cmp eax, ecx
jg 0x140003862
movzx eax, word [r8 + 6]
mov ecx, dword [r8 + 0xc]
sub ecx, eax
sub ecx, r11d
test ecx, ecx
jle 0x140003859
movzx edi, word [r8 + 4]
lea eax, [rcx + rcx*4]
add eax, eax
cmp eax, edi
jl 0x140003859
movzx ecx, word [r8 + 2]
cdq
add ebx, ecx
idiv edi
add ebx, eax
jmp 0x140003876
movzx eax, word [r8 + 2]
add ebx, eax
jmp 0x140003876
movzx eax, word [r8 + 2]
lea ebx, [rbx + rax + 2]
jmp 0x140003876
movzx eax, word [r8 + 2]
lea ebx, [rbx + rax + 2]
add r10d, 1
add r8, 0x14
cmp r10d, ebp
jb 0x1400037c0
lea edx, [rbx + 1]
mov ecx, 2
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
xor r12d, r12d
or ebp, 0xffffffff
cmp dword [0x14004c18c], r12d
mov word [rax], 0
mov r14, rax
mov qword [rsp + 0x80], rax
mov rbx, rax
jbe 0x140003ae0
xor esi, esi
nop
mov r10, qword [0x14004c1a0]
mov r11d, dword [0x14004c188]
cmp dword [rsi + r10 + 4], r11d
je 0x140003945
mov eax, dword [0x14004c190]
test eax, eax
jle 0x140003945
mov r8, qword [0x14004c1a8]
mov r9, rax
nop
nop
cmp r12d, dword [r8]
jne 0x14000393b
mov eax, dword [rsi + r10 + 4]
movzx ecx, word [rsi + r10 + 0x10]
xor edi, edi
sub eax, r11d
lea eax, [rax + rax*4]
add eax, eax
cdq
idiv ecx
test eax, eax
movsxd rdx, eax
jle 0x140003934
mov rdi, rbx
mov eax, 0x20
mov rcx, rdx
rep stosw word [rdi], ax
mov edi, edx
movsxd rax, edi
lea rbx, [rbx + rax*2]
add r8, 4
sub r9, 1
jne 0x140003900
movzx r14d, word [rsi + r10 + 0xe]
mov ecx, r12d
call fcn.140002e70
test rax, rax
mov r13, rax
je 0x140003bc3
lea rdi, [r14 + r14]
lea rdx, [rax + 0x6c]
mov rcx, rbx
mov r8, rdi
call fcn.14001c500
mov r11, qword [0x14004c138]
cmp word [r11 + 0x3c], 0
je 0x1400039b1
movzx edx, word [r11 + 0x3e]
cmp dx, 0xffff
je 0x1400039b1
mov eax, dword [r11 + 0x40]
lea rcx, [rax + r11 + 0x160]
cmp rcx, r13
jne 0x1400039b1
mov rbp, rbx
movzx eax, dx
sub rbp, qword [rsp + 0x80]
sar rbp, 1
add ebp, eax
mov r11d, dword [0x14004c18c]
lea eax, [r11 - 1]
cmp r12d, eax
jae 0x140003abf
mov r8, qword [0x14004c1a0]
movzx ecx, word [rsi + r8 + 0x20]
movzx r10d, word [rsi + r8 + 0xc]
mov r13d, dword [rsi + r8 + 8]
mov r9d, dword [rsi + r8 + 0x1c]
mov eax, r13d
sub eax, r9d
cdq
xor eax, edx
sub eax, edx
cmp r10d, ecx
cmovl ecx, r10d
cvtsi2sd xmm0, ecx
mulsd xmm0, xmm6
addsd xmm0, xmm7
cvttsd2si ecx, xmm0
cmp eax, ecx
jg 0x140003a5e
movzx eax, word [rsi + r8 + 0x12]
mov ecx, dword [rsi + r8 + 0x18]
sub ecx, eax
sub ecx, dword [rsi + r8 + 4]
test ecx, ecx
jle 0x140003a59
movzx r9d, word [rsi + r8 + 0x10]
lea eax, [rcx + rcx*4]
add eax, eax
cmp eax, r9d
jl 0x140003a59
cdq
xor ecx, ecx
idiv r9d
test eax, eax
movsxd rdx, eax
jle 0x140003a4c
lea rdi, [rbx + r14*2]
mov eax, 0x20
mov rcx, rdx
rep stosw word [rdi], ax
mov ecx, edx
lea eax, [rcx + r14]
movsxd rcx, eax
lea rbx, [rbx + rcx*2]
jmp 0x140003ac7
add rbx, rdi
jmp 0x140003ac7
sub r9d, r13d
cmp r10d, r9d
jge 0x140003a9d
cvtsi2sd xmm1, r9d
cvtsi2sd xmm0, r10d
add rbx, rdi
divsd xmm1, xmm0
cvttsd2si eax, xmm1
test eax, eax
jle 0x140003ac7
mov eax, eax
mov word [rbx], 0xd
mov word [rbx + 2], 0xa
add rbx, 4
sub rax, 1
mov word [rbx], 0
jne 0x140003a81
jmp 0x140003ac7
lea eax, [r14 + 2]
mov word [rdi + rbx], 0xd
mov word [rdi + rbx + 2], 0xa
movsxd rcx, eax
mov word [rbx + r14*2 + 4], 0
lea rbx, [rbx + rcx*2]
jmp 0x140003ac7
add rbx, rdi
mov word [rbx], 0
add r12d, 1
add rsi, 0x14
cmp r12d, r11d
jb 0x1400038d0
mov r14, qword [rsp + 0x80]
mov rcx, qword [0x14004c1a8]
call fcn.14001afe0
mov rax, qword [0x14004c138]
sub rbx, r14
sar rbx, 1
bt dword [rax + 0x50], 0xa
mov qword [0x14004c1a8], 0
jae 0x140003c4b
test ebp, ebp
js 0x140003c4b
test ebp, ebp
movsxd r13, ebp
mov r12d, ebp
mov rdi, r13
je 0x140003b4a
lea rsi, [r14 + r13*2 - 2]
nop
nop
movzx ecx, word [rsi]
call fcn.14001dde0
test eax, eax
je 0x140003b4a
sub r12d, 1
sub rsi, 2
sub rdi, 1
jne 0x140003b30
cmp ebp, ebx
jge 0x140003b69
lea rdi, [r14 + r13*2]
movzx ecx, word [rdi]
call fcn.14001dde0
test eax, eax
je 0x140003b69
add ebp, 1
add rdi, 2
cmp ebp, ebx
jl 0x140003b52
sub ebp, r12d
mov ecx, 2
lea edx, [rbp + 1]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
movsxd rcx, r12d
lea rdi, [rbp + rbp]
lea rdx, [r14 + rcx*2]
mov r8, rdi
mov rcx, rax
mov rbx, rax
call fcn.14001c500
mov rcx, r15
mov word [rdi + rbx], 0
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov r15, rsi
jmp 0x140003cd6
mov rcx, qword [0x14004c198]
call fcn.14001d780
mov rcx, qword [0x14004c138]
xor edi, edi
add rcx, 0x58
mov qword [0x14004c198], rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov rcx, qword [0x14004c1a8]
call fcn.14001afe0
mov rcx, qword [0x14004c1a0]
mov qword [0x14004c1a8], rdi
call fcn.14001afe0
mov qword [0x14004c1a0], rdi
xor eax, eax
movaps xmm6, xmmword [rsp + 0x30]
mov r15, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov r13, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
movaps xmm7, xmmword [rsp + 0x20]
mov rsi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x90]
add rsp, 0x78
ret
movzx ecx, word [r14]
mov rdx, r14
test cx, cx
je 0x140003ca1
lea rax, [r14 + 4]
nop
nop
cmp cx, 0x20
ja 0x140003c82
cmp cx, 0xd
jne 0x140003c75
cmp word [rax - 2], 0xa
cmove rdx, rax
mov cx, word [rax - 2]
add rax, 2
test cx, cx
jne 0x140003c60
cmp rdx, r14
jbe 0x140003ca1
mov rax, rdx
mov rcx, r14
sub rax, r14
sar rax, 1
sub ebx, eax
lea r8d, [rbx + 1]
add r8, r8
call fcn.14001c500
mov eax, ebx
lea rcx, [r14 + rax*2]
cmp rcx, r14
jb 0x140003cd6
nop
movzx eax, word [rcx]
cmp ax, 0xd
jne 0x140003cc7
cmp word [rcx + 2], 0xa
jne 0x140003cc7
mov word [rcx], 0
jmp 0x140003ccd
cmp ax, 0x20
ja 0x140003cd6
sub rcx, 2
cmp rcx, r14
jae 0x140003cb0
mov rcx, qword [0x14004c198]
test rcx, rcx
je 0x140003ce7
call fcn.14001d780
mov rcx, qword [0x14004c1a0]
mov qword [0x14004c198], 0
call fcn.14001afe0
mov rcx, r15
mov qword [0x14004c1a0], 0
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rax, r15
jmp 0x140003c11
xor eax, eax
add rsp, 0x78
ret