Function at 0x10042ea50
Capabilities:
Check if file exists
Delete file
Enumerate files on windows
Move file

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1480]
mov eax, 0x1580
call fcn.10046b370
sub rsp, rax
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x15a8], rbx
mov qword [rsp + 0x15b0], rsi
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rbp + 0x1470], rax
mov rdi, rcx
xor edx, edx
mov r8d, 0x20c
lea rcx, [rbp + 0x430]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0xc50]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x20c
lea rcx, [rbp + 0x640]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x20c
lea rcx, [rbp + 0x220]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x20a
lea rcx, [rbp + 0xe60]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x850]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x1070]
call sub.VCRUNTIME140.dll_memset
xor r14d, r14d
mov dword [rsp + 0x30], r14d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], 7
mov word [rsp + 0x40], r14w
lea r8d, [r14 + 0xc]
lea rdx, str.ErrorLogFile
lea rcx, [rsp + 0x40]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea r8, [rsp + 0x40]
lea rdx, [rbp - 0x78]
call fcn.10040a3c0
nop
cmp qword [rbp - 0x68], r14
jbe 0x10042ef3b
lea r8, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae r8, qword [rbp - 0x78]
mov edx, 0x106
lea rcx, [rbp + 0x430]
lea rax, [rbp + 0x430]
sub r8, rax
lea rax, [rdx + 0x7ffffef8]
test rax, rax
je 0x10042ebc6
movzx eax, word [r8 + rcx]
test ax, ax
je 0x10042ebc6
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x10042eba3
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r14w
mov edx, 0x2e
lea rcx, [rbp + 0x430]
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
test rax, rax
je 0x10042ed01
lea rcx, [rbp + 0x430]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsrev]
mov ecx, r14d
mov rax, r14
nop dword [rax]
nop word [rax + rax]
movzx r8d, word [rbp + rax + 0x430]
cmp r8w, 0x2e
je 0x10042ec37
mov word [rbp + rax + 0xe60], r8w
inc ecx
add rax, 2
cmp ecx, 0x105
jb 0x10042ec10
lea rcx, [rbp + 0xe60]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsrev]
mov edx, 0x2e
lea rcx, [rbp + 0x430]
call qword [sym.imp.VCRUNTIME140.dll_wcschr]
lea r9, [rax + 2]
mov r8d, 0x104
lea rdx, [rbp + 0xc50]
lea rax, [rbp + 0xc50]
sub r9, rax
lea rcx, [r8 + 0x7ffffefa]
test rcx, rcx
je 0x10042ec94
movzx eax, word [r9 + rdx]
test ax, ax
je 0x10042ec94
mov word [rdx], ax
add rdx, 2
sub r8, 1
jne 0x10042ec71
lea rax, [rdx - 2]
test r8, r8
cmovne rax, rdx
mov word [rax], r14w
lea rcx, [rbp + 0xc50]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsrev]
mov r8d, 0x106
lea rdx, [rbp + 0x430]
lea rcx, [rbp + 0x430]
sub rax, rcx
nop word [rax + rax]
lea rcx, [r8 + 0x7ffffef8]
test rcx, rcx
je 0x10042ecf2
movzx ecx, word [rax + rdx]
test cx, cx
je 0x10042ecf2
mov word [rdx], cx
add rdx, 2
sub r8, 1
jne 0x10042ecd0
lea rax, [rdx - 2]
test r8, r8
cmovne rax, rdx
mov word [rax], r14w
lea r9, [rbp + 0x430]
lea r8, str._s.9
mov edx, 0x106
lea rcx, [rbp + 0x220]
call fcn.10040b460
lea rcx, [rbp + 0x220]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10042ed92
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [rsp + 0x30], eax
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x10042ed92
mov r9d, 0x200
lea r8, [rbp + 0x1070]
mov edx, 0xf5
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
mov r8d, 0x400
lea rdx, [rbp + 0x850]
mov ecx, ebx
call fcn.10044bfe0
lea r8, [rbp + 0x850]
lea rdx, [rbp + 0x220]
lea rcx, [rbp + 0x1070]
call fcn.10043bdc0
mov ebx, 0x38
nop word [rax + rax]
mov dword [rsp + 0x20], ebx
lea r9, [rbp + 0x430]
lea r8, str._s._c
mov edx, 0x106
lea rcx, [rbp + 0x220]
call fcn.10040b460
lea eax, [rbx + 1]
mov dword [rsp + 0x20], eax
lea r9, [rbp + 0x430]
lea r8, str._s._c
mov edx, 0x106
lea rcx, [rbp + 0x640]
call fcn.10040b460
lea rdx, [rbp + 0x640]
lea rcx, [rbp + 0x220]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrename]
test eax, eax
je 0x10042ee69
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [rsp + 0x30], eax
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x10042ee69
mov r9d, 0x200
lea r8, [rbp + 0x1070]
mov edx, 0xf4
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
mov r8d, 0x400
lea rdx, [rbp + 0x850]
mov ecx, esi
call fcn.10044bfe0
lea r9, [rbp + 0x850]
lea r8, [rbp + 0x640]
lea rdx, [rbp + 0x220]
lea rcx, [rbp + 0x1070]
call fcn.10043bdc0
dec ebx
cmp ebx, 0x30
jg 0x10042eda0
lea rax, [rbp + 0xe60]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x430]
lea r8, str._s._s
mov edx, 0x106
lea rcx, [rbp + 0x220]
call fcn.10040b460
lea r9, [rbp + 0x430]
lea r8, str._s.1
mov edx, 0x106
lea rcx, [rbp + 0x640]
call fcn.10040b460
lea rdx, [rbp + 0x640]
lea rcx, [rbp + 0x220]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrename]
test eax, eax
je 0x10042ef3b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [rsp + 0x30], eax
cmp eax, 2
je 0x10042ef3b
mov r9d, 0x200
lea r8, [rbp + 0x1070]
mov edx, 0xf4
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
mov r8d, 0x400
lea rdx, [rbp + 0x850]
mov ecx, ebx
call fcn.10044bfe0
lea r9, [rbp + 0x850]
lea r8, [rbp + 0x640]
lea rdx, [rbp + 0x220]
lea rcx, [rbp + 0x1070]
call fcn.10043bdc0
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], r14w
mov r8d, reloc.ODBC32.dll_SQLFreeStmt
lea rdx, str.WorkingDirectory
lea rcx, [rsp + 0x60]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea r8, [rsp + 0x60]
lea rdx, [rbp - 0x58]
call fcn.10040a3c0
nop
lea r9, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae r9, qword [rbp - 0x58]
lea rax, [0x10047846c]
mov qword [rsp + 0x20], rax
lea r8, [0x100478470]
mov edx, 0x106
lea rcx, [rbp + 0x220]
call fcn.10040b460
mov word [rbp + 0x42a], r14w
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x220]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x10042f036
nop dword [rax]
lea r9, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae r9, qword [rbp - 0x58]
lea rax, [rbp - 4]
mov qword [rsp + 0x20], rax
lea r8, [0x1004784a0]
mov edx, 0x106
lea rcx, [rbp + 0x220]
call fcn.10040b460
lea rcx, [rbp + 0x220]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rbp - 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10042efe0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp qword [rbp - 0x68], 0
jbe 0x10042f085
lea rcx, [rsp + 0x30]
call fcn.10042fff0
mov ebx, eax
test eax, eax
jne 0x10042f065
mov r8d, 0x400
lea rdx, [rbp + 0x850]
mov ecx, dword [rsp + 0x30]
call fcn.10044bfe0
jmp 0x10042f08a
lea r9, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae r9, qword [rbp - 0x78]
xor edx, edx
lea ecx, [rdx + 4]
mov r8d, 0x1fc
call fcn.100432180
jmp 0x10042f08a
mov ebx, 1
test rdi, rdi
je 0x10042f0e1
cmp word [rbp + 0x850], 0
je 0x10042f0e1
mov ecx, 0x100
lea rdx, [rbp + 0x850]
sub rdx, rdi
nop dword [rax + rax]
lea rax, [rcx + 0x7ffffefe]
test rax, rax
je 0x10042f0d2
movzx eax, word [rdx + rdi]
test ax, ax
je 0x10042f0d2
mov word [rdi], ax
add rdi, 2
sub rcx, 1
jne 0x10042f0b0
lea rax, [rdi - 2]
test rcx, rcx
cmovne rax, rdi
mov word [rax], r14w
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x10042f124
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x10042f11f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x10042f11f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.100469388
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r14w
mov rdx, qword [rbp - 0x60]
cmp rdx, 8
jb 0x10042f178
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x10042f173
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x10042f173
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.100469388
mov qword [rbp - 0x68], r14
mov qword [rbp - 0x60], 7
mov word [rbp - 0x78], r14w
mov eax, ebx
mov rcx, qword [rbp + 0x1470]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x1580]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret