Function at 0x51d1fa
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x6db298
call fcn.006899cc
sub esp, 0x60
mov al, byte [ebp + 0x18]
push ebx
push esi
push edi
xor al, 1
movzx eax, al
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x3c]
push dword [ebp + 0x10]
push eax
call fcn.0046f380
push dword [ebp + 0x18]
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x54]
and dword [ebp - 4], 0
push ebx
push dword [ebp + 0x14]
push eax
call fcn.0046f380
xor esi, esi
mov dword [ebp - 0x10], 7
and dword [ebp - 0x24], esi
xor eax, eax
and dword [ebp - 0x14], esi
mov word [ebp - 0x24], ax
xor edi, edi
mov byte [ebp - 4], 2
inc edi
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], 8
mov dword [ebp + 8], edi
jb 0x51d264
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0047050d
test al, al
jne 0x51d2ca
push dword [ebp + 0x18]
lea eax, [ebp - 0x6c]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push eax
call fcn.0046f380
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x51d294
mov byte [ebp + 0x18], 0
push dword [ebp + 0x18]
push eax
call fcn.00448215
lea ecx, [ebp - 0x6c]
call fcn.0044823e
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004570f7
test al, al
jne 0x51d388
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
jb 0x51d2bc
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0047050d
test al, al
je 0x51d388
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
jb 0x51d2d6
mov eax, dword [ebp - 0x3c]
push edi
push eax
lea eax, [ebp - 0x6c]
push str._s._d
push eax
call fcn.00475719
add esp, 0x10
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
mov byte [ebp - 4], 3
jb 0x51d2f8
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x24]
call fcn.00448284
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 2
call fcn.0044823e
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x51d31a
mov eax, dword [ebp - 0x24]
push eax
call fcn.0047050d
test al, al
jne 0x51d358
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x51d330
mov eax, dword [ebp - 0x24]
push eax
call fcn.0046f5a7
cmp dword [ebx + 0x14], 8
mov edi, eax
mov ecx, ebx
jb 0x51d342
mov ecx, dword [ebx]
push ecx
call fcn.0046f5a7
push edi
push eax
call fcn.00698d49
pop ecx
pop ecx
test eax, eax
jne 0x51d361
mov edi, dword [ebp + 8]
inc edi
mov dword [ebp + 8], edi
jmp 0x51d2ca
push 8
pop edi
lea ecx, [ebp - 0x24]
cmp dword [ebp - 0x10], edi
jb 0x51d36f
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], edi
jb 0x51d37a
mov eax, dword [ebp - 0x3c]
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
push ecx
push eax
call ebx
test eax, eax
jne 0x51d38f
xor esi, esi
jmp 0x51d4d8
cmp byte [ebp + 0x1c], 0
je 0x51d3e7
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], edi
jb 0x51d3a0
mov eax, dword [ebp - 0x54]
push eax
call fcn.0047050d
test al, al
je 0x51d3e7
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], edi
jb 0x51d3b5
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x51d3e7
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], edi
jb 0x51d3cb
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x24]
cmp dword [ebp - 0x10], edi
jb 0x51d3d6
mov ecx, dword [ebp - 0x24]
push eax
push ecx
call ebx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
jmp 0x51d4d8
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], edi
jb 0x51d3f2
mov eax, dword [ebp - 0x54]
mov edi, dword [ebp - 0x28]
lea ecx, [ebp - 0x3c]
mov edx, dword [ebp - 0x3c]
cmp edi, 8
jb 0x51d402
mov ecx, edx
mov bx, word [ecx]
cmp bx, word [eax]
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
jne 0x51d43b
cmp word [ecx], 0
je 0x51d437
mov bx, word [ecx + 2]
cmp bx, word [eax + 2]
mov word [ebp + 0x1e], bx
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
jne 0x51d43b
add ecx, 4
add eax, 4
cmp word [ebp + 0x1e], 0
jne 0x51d402
xor eax, eax
jmp 0x51d440
sbb eax, eax
or eax, 1
test eax, eax
je 0x51d4be
cmp dword [ebp - 0x40], 8
lea ecx, [ebp - 0x54]
jb 0x51d450
mov ecx, dword [ebp - 0x54]
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x51d45c
mov eax, dword [ebp - 0x24]
push ecx
push eax
call ebx
test eax, eax
jne 0x51d4d8
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call edi
mov esi, eax
cmp esi, 3
je 0x51d478
cmp esi, 2
jne 0x51d4b4
xor esi, esi
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], 8
jb 0x51d486
mov eax, dword [ebp - 0x54]
push eax
call fcn.00471890
test al, al
je 0x51d4b0
cmp dword [ebp - 0x40], 8
lea eax, [ebp - 0x54]
jb 0x51d49c
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x10], 8
lea ecx, [ebp - 0x24]
jb 0x51d4a8
mov ecx, dword [ebp - 0x24]
push eax
push ecx
call ebx
test eax, eax
jne 0x51d4d8
call edi
mov esi, eax
test esi, esi
je 0x51d4d8
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0x3c]
cmp edi, 8
jb 0x51d4c8
mov ecx, edx
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x51d4d4
mov eax, dword [ebp - 0x24]
push ecx
push eax
call ebx
mov eax, dword [ebp - 0x10]
cmp eax, 8
jb 0x51d513
mov ecx, dword [ebp - 0x24]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x18], ecx
cmp eax, 0x1000
jb 0x51d50a
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x18]
push eax
call fcn.0044810a
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
and dword [ebp - 0x14], 0
lea ecx, [ebp - 0x54]
xor eax, eax
mov dword [ebp - 0x10], 7
mov word [ebp - 0x24], ax
call fcn.0044823e
lea ecx, [ebp - 0x3c]
call fcn.0044823e
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18