Function at 0x10313d0
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x12c0
call fcn.0105fe80
sub rsp, rax
mov rax, qword [0x010667f0]
xor rax, rsp
mov qword [rsp + 0x12b8], rax
movzx eax, word [0x01001c50]
mov word [rsp + 0xe90], ax
lea rax, [rsp + 0xe92]
mov rdi, rax
xor eax, eax
mov ecx, 0x20a
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x10a0], ax
lea rax, [rsp + 0x10a2]
mov rdi, rax
xor eax, eax
mov ecx, 0x20a
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x840], ax
lea rax, [rsp + 0x842]
mov rdi, rax
xor eax, eax
mov ecx, 0x20a
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0xa60], ax
lea rax, [rsp + 0xa62]
mov rdi, rax
xor eax, eax
mov ecx, 0x20a
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0xc80], ax
lea rax, [rsp + 0xc82]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x440], ax
lea rax, [rsp + 0x442]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
movzx eax, word [0x01001c50]
mov word [rsp + 0x40], ax
lea rax, [rsp + 0x42]
mov rdi, rax
xor eax, eax
mov ecx, 0x3fe
rep stosb byte [rdi], al
mov dword [rsp + 0x12b4], 0
mov dword [rsp + 0xc70], 0
mov dword [rsp + 0x12b0], 0
mov dword [rsp + 0xa50], 0
cmp qword [rsp + 0x12d0], 0
jne 0x1031522
xor eax, eax
jmp 0x1031a4a
movzx eax, word [0x01066f10]
test eax, eax
je 0x10319fe
cmp qword [0x01068c18], 0
je 0x10319fe
lea r8, [0x01066f10]
mov edx, 0x106
lea rcx, [rsp + 0xe90]
call fcn.0105ab90
mov dx, 0x2e
lea rcx, [rsp + 0xe90]
call fcn.01029070
test rax, rax
je 0x103163e
lea rcx, [rsp + 0xe90]
call qword [sym.imp.MSVCR80.dll__wcsrev]
mov dword [rsp + 0xa50], 0
movsxd rax, dword [rsp + 0xa50]
cmp rax, 0x105
jae 0x10315e3
movsxd rax, dword [rsp + 0xa50]
movzx eax, word [rsp + rax*2 + 0xe90]
cmp eax, 0x2e
je 0x10315e3
movsxd rax, dword [rsp + 0xa50]
movsxd rcx, dword [rsp + 0xa50]
movzx eax, word [rsp + rax*2 + 0xe90]
mov word [rsp + rcx*2 + 0xc80], ax
mov eax, dword [rsp + 0xa50]
add eax, 1
mov dword [rsp + 0xa50], eax
jmp 0x103158b
lea rcx, [rsp + 0xc80]
call qword [sym.imp.MSVCR80.dll__wcsrev]
mov dx, 0x2e
lea rcx, [rsp + 0xe90]
call fcn.01029070
add rax, 2
mov r8, rax
mov edx, 0x106
lea rcx, [rsp + 0x10a0]
call fcn.0105ab90
lea rcx, [rsp + 0x10a0]
call qword [sym.imp.MSVCR80.dll__wcsrev]
mov r8, rax
mov edx, 0x106
lea rcx, [rsp + 0xe90]
call fcn.0105ab90
lea r9, [rsp + 0xe90]
lea r8, [0x01007d00]
mov edx, 0x106
lea rcx, [rsp + 0xa60]
call fcn.01016110
lea rcx, [rsp + 0xa60]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10316e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x12b4], eax
cmp dword [rsp + 0x12b4], 2
je 0x10316e4
cmp dword [rsp + 0x12b4], 3
je 0x10316e4
mov r9d, 0x200
lea r8, [rsp + 0x40]
mov edx, 0xf5
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov r8d, 0x400
lea rdx, [rsp + 0x440]
mov ecx, dword [rsp + 0x12b4]
call fcn.01053650
lea r8, [rsp + 0x440]
lea rdx, [rsp + 0xa60]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x12b0], 0x38
jmp 0x1031702
mov eax, dword [rsp + 0x12b0]
sub eax, 1
mov dword [rsp + 0x12b0], eax
cmp dword [rsp + 0x12b0], 0x30
jle 0x1031812
mov eax, dword [rsp + 0x12b0]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xe90]
lea r8, [0x01007cf0]
mov edx, 0x106
lea rcx, [rsp + 0xa60]
call fcn.01016110
mov eax, dword [rsp + 0x12b0]
add eax, 1
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0xe90]
lea r8, [0x01007cf0]
mov edx, 0x106
lea rcx, [rsp + 0x840]
call fcn.01016110
lea rdx, [rsp + 0x840]
lea rcx, [rsp + 0xa60]
call qword [sym.imp.MSVCR80.dll__wrename]
mov dword [rsp + 0xc70], eax
cmp dword [rsp + 0xc70], 0
je 0x103180d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x12b4], eax
cmp dword [rsp + 0x12b4], 2
je 0x103180d
cmp dword [rsp + 0x12b4], 3
je 0x103180d
mov r9d, 0x200
lea r8, [rsp + 0x40]
mov edx, 0xf4
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov r8d, 0x400
lea rdx, [rsp + 0x440]
mov ecx, dword [rsp + 0x12b4]
call fcn.01053650
lea r9, [rsp + 0x440]
lea r8, [rsp + 0x840]
lea rdx, [rsp + 0xa60]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCR80.dll_wprintf]
jmp 0x10316f1
lea rcx, [0x01066bf0]
call qword [0x01069178]
test eax, eax
jne 0x1031856
cmp dword [0x010689c0], 0
je 0x1031849
cmp dword [0x01068484], 0
je 0x1031849
lea rdx, [0x01007d10]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066bf0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x103187c
cmp dword [0x01068484], 0
je 0x103187c
lea rdx, [0x01007d10]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp qword [0x01068c18], 0
je 0x10319cb
mov rcx, qword [0x01068c18]
call qword [sym.imp.MSVCR80.dll_fclose]
mov qword [0x01068c18], 0
lea rax, [rsp + 0xc80]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xe90]
lea r8, [0x01007ce0]
mov edx, 0x106
lea rcx, [rsp + 0xa60]
call fcn.01016110
lea r9, [rsp + 0xe90]
lea r8, [0x01007cd0]
mov edx, 0x106
lea rcx, [rsp + 0x840]
call fcn.01016110
lea rdx, [rsp + 0x840]
lea rcx, [rsp + 0xa60]
call qword [sym.imp.MSVCR80.dll__wrename]
mov dword [rsp + 0xc70], eax
cmp dword [rsp + 0xc70], 0
je 0x1031989
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x12b4], eax
cmp dword [rsp + 0x12b4], 2
je 0x1031989
mov r9d, 0x200
lea r8, [rsp + 0x40]
mov edx, 0xf4
mov rcx, qword [0x01069158]
call qword [sym.imp.USER32.dll_LoadStringW]
mov r8d, 0x400
lea rdx, [rsp + 0x440]
mov ecx, dword [rsp + 0x12b4]
call fcn.01053650
lea r9, [rsp + 0x440]
lea r8, [rsp + 0x840]
lea rdx, [rsp + 0xa60]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCR80.dll_wprintf]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor edx, edx
lea rcx, [0x01066f10]
call fcn.01037570
mov qword [0x01068c18], rax
cmp qword [0x01068c18], 0
jne 0x10319cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x400
lea rdx, [rsp + 0x440]
mov ecx, eax
call fcn.01053650
lea rcx, [0x01066bf0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x10319fe
cmp dword [0x01068484], 0
je 0x10319fe
lea rdx, [0x01007d10]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
movzx eax, word [rsp + 0x440]
test eax, eax
je 0x1031a2d
mov r9d, SQLBindParameter
mov r8d, 0x200
lea rdx, [rsp + 0x440]
mov rcx, qword [rsp + 0x12d0]
call fcn.0103de40
jmp 0x1031a45
mov r9d, 0x4e
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x12d0]
call fcn.0103de40
mov eax, 1
mov rcx, qword [rsp + 0x12b8]
xor rcx, rsp
call fcn.01059ab0
add rsp, 0x12c0
pop rdi
ret