Function at 0x5082f6
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x6bc67c
call fcn.0066bd6c
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.0045e484
push dword [ebp + 0x18]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x54]
push esi
push dword [ebp + 0x14]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.0045e484
xor eax, eax
mov dword [ebp - 0x24], ebx
mov edi, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], 7
mov word [ebp - 0x24], ax
inc ebx
mov byte [ebp - 4], 2
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
mov dword [ebp + 0x14], ebx
jb 0x50835f
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00458d4c
test al, al
jne 0x5083c5
push dword [ebp + 0x18]
lea eax, [ebp - 0x6c]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push eax
call fcn.0045e484
lea ecx, [ebp - 0x3c]
cmp ecx, eax
je 0x50838f
mov byte [ebp + 0x18], 0
push dword [ebp + 0x18]
push eax
call fcn.00427543
lea ecx, [ebp - 0x6c]
call fcn.0042756c
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004368cc
test al, al
jne 0x508487
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
jb 0x5083b7
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00458d4c
test al, al
je 0x508487
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
jb 0x5083d1
mov eax, dword [ebp - 0x3c]
push ebx
push eax
lea eax, [ebp - 0x6c]
push str._s._d
push eax
call fcn.004646d1
add esp, 0x10
cmp dword [eax + 0x14], 8
mov ecx, eax
mov byte [ebp - 4], 3
jb 0x5083f2
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x24]
call fcn.004275b5
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 2
call fcn.0042756c
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x508416
mov eax, dword [ebp - 0x24]
push eax
call fcn.00458d4c
test al, al
jne 0x508457
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x50842c
mov eax, dword [ebp - 0x24]
cmp dword [esi + 0x14], 8
mov ebx, esi
jb 0x508436
mov ebx, dword [esi]
push eax
call fcn.0045e6ab
push ebx
mov esi, eax
call fcn.0045e6ab
push esi
push eax
call fcn.0067b3f6
pop ecx
pop ecx
test eax, eax
jne 0x508460
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
inc ebx
mov dword [ebp + 0x14], ebx
jmp 0x5083c5
push 8
pop esi
lea ecx, [ebp - 0x24]
cmp dword [ebp - 0x10], esi
jb 0x50846e
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jb 0x508479
mov eax, dword [ebp - 0x3c]
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
push ecx
push eax
call ebx
test eax, eax
jne 0x50848e
xor edi, edi
jmp 0x5085d7
cmp byte [ebp + 0x1c], 0
je 0x5084e6
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jb 0x50849f
mov eax, dword [ebp - 0x54]
push eax
call fcn.00458d4c
test al, al
je 0x5084e6
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jb 0x5084b4
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x5084e6
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], esi
jb 0x5084ca
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x24]
cmp dword [ebp - 0x10], esi
jb 0x5084d5
mov ecx, dword [ebp - 0x24]
push eax
push ecx
call ebx
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
jmp 0x5085d7
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], esi
jb 0x5084f1
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x28]
lea ecx, [ebp - 0x3c]
mov edx, dword [ebp - 0x3c]
cmp esi, 8
jb 0x508501
mov ecx, edx
mov bx, word [ecx]
cmp bx, word [eax]
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
jne 0x50853a
cmp word [ecx], 0
je 0x508536
mov bx, word [ecx + 2]
cmp bx, word [eax + 2]
mov word [ebp + 0x1e], bx
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileW]
jne 0x50853a
add ecx, 4
add eax, 4
cmp word [ebp + 0x1e], 0
jne 0x508501
xor eax, eax
jmp 0x50853f
sbb eax, eax
or eax, 1
test eax, eax
je 0x5085bd
cmp dword [ebp - 0x40], 8
lea ecx, [ebp - 0x54]
jb 0x50854f
mov ecx, dword [ebp - 0x54]
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x50855b
mov eax, dword [ebp - 0x24]
push ecx
push eax
call ebx
test eax, eax
jne 0x5085d7
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
mov edi, eax
cmp edi, 3
je 0x508577
cmp edi, 2
jne 0x5085b3
xor edi, edi
lea eax, [ebp - 0x54]
cmp dword [ebp - 0x40], 8
jb 0x508585
mov eax, dword [ebp - 0x54]
push eax
call fcn.0046093f
test al, al
je 0x5085af
cmp dword [ebp - 0x40], 8
lea eax, [ebp - 0x54]
jb 0x50859b
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x10], 8
lea ecx, [ebp - 0x24]
jb 0x5085a7
mov ecx, dword [ebp - 0x24]
push eax
push ecx
call ebx
test eax, eax
jne 0x5085d7
call esi
mov edi, eax
test edi, edi
je 0x5085d7
mov esi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0x3c]
cmp esi, 8
jb 0x5085c7
mov ecx, edx
cmp dword [ebp - 0x10], 8
lea eax, [ebp - 0x24]
jb 0x5085d3
mov eax, dword [ebp - 0x24]
push ecx
push eax
call ebx
mov eax, dword [ebp - 0x10]
cmp eax, 8
jb 0x508612
mov ecx, dword [ebp - 0x24]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x18], ecx
cmp eax, 0x1000
jb 0x508609
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp + 0x18]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
push eax
push ecx
call fcn.0066bb0a
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.0042756c
lea ecx, [ebp - 0x3c]
call fcn.0042756c
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18