Function at 0x58d420
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5f9f00
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
mov dword [0x67b000], ebp
call edi
mov esi, dword [esp + 0x70]
mov dword [0x67b008], eax
cmp esi, ebp
je 0x58d837
push esi
call fcn.004447d0
add esp, 4
test eax, eax
je 0x58d837
mov ebx, dword [esp + 0x74]
cmp ebx, ebp
je 0x58d837
push ebx
call fcn.004447d0
add esp, 4
test eax, eax
je 0x58d837
cmp dword [0x67b00c], ebp
jne 0x58d4ac
mov dword [0x67b000], 2
mov dword [0x67b004], 0x2937
jmp 0x58d84b
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x58d4d5
test al, 0x10
je 0x58d4d5
mov dword [0x67b000], 0x1e
mov dword [0x67b004], 0x2941
jmp 0x58d84b
mov edx, dword [0x5ffc34]
xor ecx, ecx
cmp eax, 0xffffffff
mov dword [esp + 0x10], edx
setne cl
mov dword [esp + 0x14], ecx
mov eax, dword [0x67b540]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x66b9a4
push ebx
mov dword [esp + 0x78], ebp
call fcn.0059db40
add esp, 0x10
test eax, eax
jne 0x58d53d
mov dword [0x67b000], 0x24
mov dword [0x67b004], 0x294c
call edi
lea ecx, [esp + 0x10]
mov dword [0x67b008], eax
mov dword [esp + 0x68], 0xffffffff
call fcn.0045ddc0
jmp 0x58d852
push ebp
push 0x80
push 3
push ebp
push 5
push SysReAllocStringLen
push esi
mov dword [esp + 0x90], 1
call fcn.0059de70
add esp, 0x1c
cmp eax, 0xffffffff
je 0x58d59f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x7c]
push 5
push edx
mov edx, dword [esp + 0x18]
push eax
push ecx
push edx
push esi
call fcn.0058c800
add esp, 0x18
test eax, eax
je 0x58d7a8
jmp 0x58d672
push ebp
push 0x80
push 3
push ebp
push 7
push SysReAllocStringLen
push esi
call fcn.0059de70
add esp, 0x1c
cmp eax, 0xffffffff
je 0x58d817
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
push esi
call ebp
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x7c]
push 7
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
push esi
call fcn.0058c800
add esp, 0x18
test eax, eax
je 0x58d7a8
lea edx, [esp + 0x3c]
xor eax, eax
mov ecx, 8
lea edi, [esp + 0x40]
push edx
mov dword [esp + 0x40], 0
push eax
push esi
rep stosd dword es:[edi], eax
call ebp
mov ecx, 2
lea edi, [esp + 0x50]
lea esi, [esp + 0x2c]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x58d7fb
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x58]
cmp ecx, eax
jne 0x58d7fb
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x5c]
cmp edx, eax
jne 0x58d7fb
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
cmp dword [esp + 0x14], ebp
je 0x58d76a
mov eax, dword [0x5ffc34]
mov dword [esp + 0x70], eax
mov ecx, dword [0x67b540]
lea edx, [esp + 0x70]
push ecx
push edx
push 0x66b740
push ebx
mov byte [esp + 0x78], 1
call fcn.0059db40
add esp, 0x10
test eax, eax
je 0x58d7d0
mov eax, dword [esp + 0x70]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 2
push eax
push ebx
call esi
test eax, eax
je 0x58d754
mov ecx, dword [esp + 0x10]
push 3
push ebx
push ecx
call esi
test eax, eax
je 0x58d6fb
mov edx, dword [esp + 0x70]
mov dword [esp + 0x74], ebp
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x58d7eb
mov eax, dword [esp + 0x70]
push eax
call fcn.0059d960
add esp, 4
jmp 0x58d7eb
mov dword [0x67b000], 0x27
mov dword [0x67b004], 0x29c6
call edi
mov ecx, dword [esp + 0x70]
push 3
push ebx
push ecx
mov dword [0x67b008], eax
call esi
test eax, eax
jne 0x58d7eb
mov eax, dword [esp + 0x78]
mov dword [esp + 0x74], 0xffffffff
cmp eax, ebp
je 0x58d7eb
mov edx, dword [esp + 0x70]
push 0x103
push edx
push eax
call fcn.00444793
add esp, 0xc
jmp 0x58d7eb
mov dword [0x67b000], 0x28
mov dword [0x67b004], 0x29d4
jmp 0x58d7e4
mov eax, dword [esp + 0x10]
push 3
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x58d782
mov dword [esp + 0x74], ebp
jmp 0x58d79d
mov dword [0x67b000], 0x27
mov dword [0x67b004], 0x29a7
call edi
mov dword [0x67b008], eax
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x10]
mov dword [esp + 0x68], 0xffffffff
call fcn.0045ddc0
mov eax, dword [esp + 0x74]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
add esp, 0x5c
ret
mov dword [0x67b000], 0x24
mov dword [0x67b004], 0x29b1
call edi
mov dword [0x67b008], eax
lea ecx, [esp + 0x70]
mov byte [esp + 0x68], 0
call fcn.0045ddc0
jmp 0x58d79d
mov dword [0x67b000], 0x34
mov dword [0x67b004], 0x2993
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x58d798
mov dword [0x67b000], 3
mov dword [0x67b004], 0x2999
call edi
mov dword [0x67b008], eax
jmp 0x58d7a8
mov dword [0x67b000], 1
mov dword [0x67b004], 0x2930
call edi
mov dword [0x67b008], eax
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x5c
ret