Function at 0x518260
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ca66
mov eax, dword fs:[0]
push eax
sub esp, 0xb1c
mov eax, dword [0x601018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor edi, edi
mov eax, 0x5bc564
lea esi, [ebp - 0x454]
mov dword [ebp - 0xb1c], ebx
mov dword [ebp - method.FileFind.virtual_0], vtable.FileFind.0
mov dword [ebp - 0x440], 0xf
mov dword [ebp - 0x444], 0
mov byte [ebp - 0x454], 0
call fcn.00402fe0
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x428], eax
mov byte [ebp - 0x438], al
mov eax, 0x5bc564
lea esi, [ebp - 0x438]
mov dword [ebp - 0x424], 0xf
call fcn.00402fe0
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x418], 0xffffffff
mov eax, 1
mov dword [ebp - 4], eax
cmp byte [ebx + 0xc40], 0
je 0x51838f
lea ecx, [ebp - 0x5c0]
mov dword [ebp - 0x4b8], eax
push str.Purging_directory
lea eax, [ebp - 0x5c8]
mov dword [ebp - 0x5c8], ecx
mov dword [ebp - 0x5c4], 0x100
mov dword [ebp - 0x4c0], edi
mov dword [ebp - 0x4bc], edi
mov dword [ebp - 0x4b4], edi
mov dword [ebp - 0x4b0], edi
mov byte [ebp - 0x4ac], 0
call fcn.00506660
lea eax, [ebx + 0x10]
cmp eax, edi
je 0x518384
cmp byte [eax], 0
je 0x518384
push eax
push str.directory___s_
lea esi, [ebp - 0x5c8]
call fcn.00506600
add esp, 8
lea esi, [ebp - 0x5c8]
call fcn.00506520
lea edx, [ebp - 0x9d8]
push edx
lea esi, [ebx + 0x10]
lea eax, [ebx + 0x410]
push eax
mov edx, esi
lea ecx, [ebp - 0x458]
mov dword [ebp - 0xb24], esi
call fcn.0050a5e0
mov dword [ebp - 0xb20], eax
cmp eax, edi
je 0x518645
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
test edx, edx
jne 0x518645
cmp byte [ebp - 0x5d0], 1
je 0x5185c4
cmp byte [ebp - 0x9d8], 0x2e
je 0x5185c4
mov eax, dword [ebp - 0x5d8]
add dword [ebx + 0xc18], eax
mov ecx, dword [ebp - 0x5d4]
lea edx, [ebp - 0x9d8]
adc dword [ebx + 0xc1c], ecx
add dword [ebx + 0xc20], 1
push edx
push ebx
adc dword [ebx + 0xc24], edi
call fcn.005181d0
test al, al
je 0x5185c4
cmp esi, edi
jne 0x51842c
call dword [sym.imp.MSVCR100.dll_abort]
lea eax, [ebp - 0x410]
mov edx, esi
mov ecx, eax
sub edx, ecx
mov cl, byte [edx + eax]
test cl, cl
je 0x518449
mov byte [eax], cl
inc eax
lea ecx, [ebp - 0x11]
cmp eax, ecx
jb 0x518438
mov byte [eax], 0
push 0x400
mov ebx, 0x5cc7f4
lea eax, [ebp - 0x410]
call fcn.00401570
add esp, 4
push 0x400
lea ebx, [ebp - 0x9d8]
lea eax, [ebp - 0x410]
call fcn.00401570
mov ebx, dword [ebp - 0xb1c]
mov edx, dword [ebx + 8]
add esp, 4
or edx, dword [ebx + 0xc]
je 0x5184de
push 0x30
lea eax, [ebp - 0x488]
push 0
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x488]
push ecx
lea edx, [ebp - 0x410]
push edx
call dword [sym.imp.MSVCR100.dll__stat64i32]
mov eax, dword [ebp - 0x468]
add esp, 8
test eax, eax
je 0x5185bc
cdq
mov ecx, ebx
cmp edx, dword [ecx + 0xc]
jg 0x5185bc
jl 0x5184dc
mov edx, ecx
cmp eax, dword [edx + 8]
jae 0x5185bc
mov ebx, ecx
add dword [ebx + 0xc30], 1
mov eax, dword [ebp - 0x5d8]
mov ecx, dword [ebp - 0x5d4]
adc dword [ebx + 0xc34], 0
add dword [ebx + 0xc28], eax
adc dword [ebx + 0xc2c], ecx
cmp byte [ebx + 0xc40], 0
je 0x51856d
mov ecx, str.Deleting
lea esi, [ebp - 0xb18]
call fcn.00506460
cmp byte [ebp - 0x410], 0
mov esi, eax
je 0x51853c
lea edx, [ebp - 0x410]
push edx
push str.filename___s_
call fcn.00506600
add esp, 8
mov eax, dword [ebp - 0x5d4]
mov ecx, dword [ebp - 0x5d8]
push eax
push ecx
push str.size
push str._s___lld_
call fcn.00506600
add esp, 0x10
lea esi, [ebp - 0xb18]
call fcn.00506520
mov esi, dword [ebp - 0xb24]
cmp byte [ebx + 0xc41], 0
jne 0x5185bc
lea edx, [ebp - 0x410]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
neg eax
dec eax
jns 0x5185bc
mov eax, dword [ebp - 0xb1c]
mov ecx, dword [ebp - 0x5d8]
sub dword [eax + 0xc28], ecx
mov edx, dword [ebp - 0x5d4]
mov ebx, eax
sbb dword [eax + 0xc2c], edx
add dword [eax + 0xc38], 1
adc dword [eax + 0xc3c], 0
jmp 0x5185c2
mov ebx, dword [ebp - 0xb1c]
xor edi, edi
mov eax, dword [ebp - 0xb20]
push eax
lea edx, [ebp - 0x9d8]
lea ecx, [ebp - 0x458]
call fcn.0050a8d0
test al, al
jne 0x5183c1
mov eax, dword [ebp - 0xb20]
cmp eax, 0xffffffff
je 0x5185f6
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x454]
mov ecx, 0x10
mov dword [ebp - 0x444], edi
cmp dword [ebp - 0x440], ecx
jae 0x518615
lea eax, [ebp - 0x454]
mov byte [eax], 0
mov eax, dword [ebp - 0x438]
mov dword [ebp - 0x428], edi
cmp dword [ebp - 0x424], ecx
jae 0x518632
lea eax, [ebp - 0x438]
mov byte [eax], 0
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x418], 0xffffffff
lea ecx, [ebp - 0x458]
call fcn.0050a540
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596083
mov esp, ebp
pop ebp
ret