Function at 0x41e8d4
Capabilities:
Check if file exists
Copy file
Create directory
Delete directory
Delete file
Get common file path
Move file
Set file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x40c]
sub esp, 0x48c
mov eax, dword [0x4b7f10]
xor eax, ebp
mov dword [ebp + 0x408], eax
mov eax, dword [ebp + 0x418]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x41c]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x420]
push ebx
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x414]
mov ebx, dword [eax*4 + 0x4c5bc8]
push esi
xor esi, esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x44], 0x64
mov dword [0x4b9f88], 1
cmp ebx, esi
jne 0x41e93d
mov eax, 0x86180002
jmp 0x41f1d9
push edi
mov dword [ebp - 0x58], esi
cmp dword [ebx + 0x405c], esi
jbe 0x41f1d5
cmp dword [ebp - 0x60], esi
je 0x41e95d
call dword [ebp - 0x60]
test eax, eax
je 0x41f1d5
mov edx, dword [ebp - 0x58]
mov eax, edx
shl eax, 5
add eax, dword [ebx + 0x4050]
mov dword [ebp - 0x64], eax
mov eax, dword [ebx + 0x70a4]
lea eax, [ebx + eax*2 + 0x60a4]
push eax
lea eax, [ebx + 0x4040]
call fcn.00420c1c
pop ecx
cmp dword [ebx + 0x7ad0], esi
jbe 0x41e9c2
lea edi, [ebx + 0x70a8]
mov eax, dword [ebx + 0x70a4]
lea eax, [ebx + eax*2 + 0x60a4]
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x41efd2
inc esi
add edi, 0x208
cmp esi, dword [ebx + 0x7ad0]
jb 0x41e996
mov eax, dword [ebx + 0x70a4]
lea eax, [ebx + eax*2 + 0x60a4]
push eax
lea ecx, [ebp - 0x40]
call fcn.004018f6
lea edx, [ebx + 0x7ad4]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x41e9e3
sub eax, esi
sar eax, 1
je 0x41ea06
push 0
push edx
lea ecx, [ebp - 0x40]
call fcn.0040d8e5
test eax, eax
je 0x41efc6
mov eax, dword [ebx + 0x70a4]
lea edi, [ebx + eax*2 + 0x60a4]
cmp word [edi], 0
je 0x41eb2c
mov dword [ebp - 0x4c], edi
cmp word [edi], 0x2f
jne 0x41eb1a
xor eax, eax
lea esi, [ebx + 0x60a4]
push esi
mov word [edi], ax
call fcn.0041f852
pop ecx
test eax, eax
je 0x41eb14
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41eb14
cmp eax, 0x50
je 0x41eb14
cmp dword [ebp - 0x44], 0x4e20
jge 0x41eaa5
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call fcn.0041f852
pop ecx
test eax, eax
je 0x41ea9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41ea9c
cmp eax, 0x50
je 0x41ea9c
mov eax, dword [ebp - 0x44]
add eax, eax
cmp eax, 0x4e20
mov dword [ebp - 0x44], eax
jl 0x41ea67
cmp dword [ebp - 0x44], 0x4e20
jl 0x41eb0d
push 0
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x41eb0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
lea ecx, [ebp - 0x24]
call fcn.004018f6
push 0x4a91e0
lea ecx, [ebp - 0x24]
call fcn.0040197d
push 0
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jne 0x41effe
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41eaef
lea eax, [ebp - 0x20]
push 9
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x41efeb
push 0
push 1
lea ecx, [ebp - 0x24]
call fcn.00401a58
mov dword [ebp - 0x44], 0x64
push 0x5c
pop eax
mov word [edi], ax
mov edi, dword [ebp - 0x4c]
inc edi
inc edi
cmp word [edi], 0
mov dword [ebp - 0x4c], edi
jne 0x41ea20
mov eax, dword [ebp - 0x64]
cmp byte [eax + 0x19], 0
je 0x41ec1d
lea edi, [ebx + 0x60a4]
push edi
call fcn.0041f852
pop ecx
test eax, eax
je 0x41efc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41efc6
cmp eax, 0x50
je 0x41efc6
mov esi, 0x4e20
cmp dword [ebp - 0x44], esi
jge 0x41ebad
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call fcn.0041f852
pop ecx
test eax, eax
je 0x41eba4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41eba4
cmp eax, 0x50
je 0x41eba4
mov eax, dword [ebp - 0x44]
add eax, eax
cmp eax, esi
mov dword [ebp - 0x44], eax
jl 0x41eb72
cmp dword [ebp - 0x44], esi
jl 0x41efc6
push 0
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
je 0x41efc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
lea ecx, [ebp - 0x24]
call fcn.004018f6
push 0x4a91e0
lea ecx, [ebp - 0x24]
call fcn.0040197d
xor esi, esi
push esi
push edi
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jne 0x41f066
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41ebfb
lea eax, [ebp - 0x20]
push 9
push edi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x41f053
push esi
push 1
lea ecx, [ebp - 0x24]
call fcn.00401a58
jmp 0x41efc6
push 0x64
pop edi
lea esi, [ebx + 0x60a4]
lea eax, [ebp - 0x48]
push esi
push eax
xor eax, eax
inc eax
mov dword [ebp - 0x44], edi
call fcn.0041f86b
pop ecx
pop ecx
test eax, eax
je 0x41eeab
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x48]
push esi
push eax
xor eax, eax
inc eax
call fcn.0041f86b
pop ecx
pop ecx
test eax, eax
je 0x41ec64
add edi, edi
cmp edi, 0x4e20
jl 0x41ec40
cmp edi, 0x4e20
jl 0x41eea4
xor edi, edi
push esi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x44], edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41ed0d
push esi
lea ecx, [ebp - 0x24]
call fcn.004018f6
push str._rename
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0040f161
add esp, 0xc
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp - 0x24]
call fcn.004019a1
push edi
push 1
lea ecx, [ebp - 0x80]
call fcn.00401a58
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41ecc8
lea eax, [ebp - 0x20]
push 9
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x41ecdd
mov dword [ebp - 0x4c], 1
lea eax, [ebp - 0x48]
push esi
push eax
xor eax, eax
inc eax
call fcn.0041f86b
pop ecx
pop ecx
test eax, eax
jne 0x41ecf7
mov dword [ebp - 0x44], 1
push edi
push 1
lea ecx, [ebp - 0x24]
call fcn.00401a58
cmp dword [ebp - 0x44], edi
jne 0x41eea4
xor edi, edi
push esi
lea ecx, [ebp - 0x24]
call fcn.004018f6
push 0x4a91e0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0040f161
add esp, 0xc
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp - 0x24]
call fcn.004019a1
push edi
push 1
lea ecx, [ebp - 0x80]
call fcn.00401a58
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41ed4e
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x48]
push eax
xor eax, eax
inc eax
call fcn.0041f86b
pop ecx
pop ecx
test eax, eax
jne 0x41edaa
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41ed76
lea eax, [ebp - 0x20]
push 0xb
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x41edaa
push edi
push 0x80
push 3
push edi
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
je 0x41edaa
mov dword [ebp - 0x44], 1
push edi
push 1
lea ecx, [ebp - 0x24]
call fcn.00401a58
cmp dword [ebp - 0x44], edi
jne 0x41eea4
xor eax, eax
mov edi, 0x206
push edi
push eax
mov word [ebp - 8], ax
lea eax, [ebp - 6]
push eax
call fcn.0046cbb0
xor eax, eax
push edi
mov word [ebp + 0x200], ax
xor edi, edi
lea eax, [ebp + 0x202]
push edi
push eax
call fcn.0046cbb0
add esp, 0x18
lea eax, [ebp - 8]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.thunderErrorFile
lea eax, [ebp - 8]
push eax
lea eax, [ebp + 0x200]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push edi
push 0x80
push 2
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 1
push 0x40000000
lea eax, [ebp + 0x200]
push eax
call edi
cmp eax, 0xffffffff
je 0x41f0ed
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push esi
lea eax, [ebp + 0x200]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x41ee7c
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push esi
call edi
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
je 0x41ee7c
mov dword [ebp - 0x44], 1
lea eax, [ebp + 0x200]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41ee9a
lea eax, [ebp + 0x200]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x44], 0
je 0x41f0ed
mov dword [ebp - 0x44], 0x64
mov eax, dword [ebp - 0x58]
lea edi, [ebx + eax*4 + 0x40a4]
push dword [edi]
lea esi, [ebx + eax*4 + 0x50a4]
lea eax, [ebp - 0x48]
push eax
call fcn.0041f920
pop ecx
pop ecx
test eax, eax
je 0x41ef03
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [edi]
lea eax, [ebp - 0x48]
push eax
call fcn.0041f920
pop ecx
pop ecx
test eax, eax
je 0x41eef6
mov eax, dword [ebp - 0x44]
add eax, eax
cmp eax, 0x4e20
mov dword [ebp - 0x44], eax
jl 0x41eecd
cmp dword [ebp - 0x44], 0x4e20
jge 0x41f15c
lea esi, [ebp - 0x48]
call fcn.0041f8ad
test eax, eax
je 0x41efad
cmp dword [0x4b9f88], 0
je 0x41ef2e
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
and dword [0x4b9f88], 0
lea esi, [ebp - 0x48]
call fcn.0041f8ad
test eax, eax
je 0x41efad
lea eax, [ebx + 0x60a4]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x41ef43
sub eax, edx
sar eax, 1
add eax, eax
push eax
lea esi, [ebx + 0x60a4]
push esi
push dword [ebp - 0x50]
call fcn.0046f200
mov eax, esi
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x41ef6b
mov edi, dword [ebp - 0x50]
sub eax, ecx
sar eax, 1
xor ecx, ecx
mov word [edi + eax*2], cx
dec edi
dec edi
mov ax, word [edi + 2]
inc edi
inc edi
test ax, ax
jne 0x41ef84
mov esi, str._CLose
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 0x5c], 0x86180003
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x54]
mov dword [ecx], eax
jmp 0x41efc6
mov eax, dword [ebp - 0x64]
cmp byte [eax + 0x1d], 0
je 0x41efc6
push dword [eax + 0x14]
lea eax, [ebx + 0x60a4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 1
lea ecx, [ebp - 0x40]
call fcn.00401a58
inc dword [ebp - 0x58]
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebx + 0x405c]
jae 0x41f1d5
xor esi, esi
jmp 0x41e94d
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41eff7
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
add ebx, 0x60a4
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x41f009
mov esi, dword [ebp - 0x50]
sub eax, edx
sar eax, 1
add eax, eax
push eax
push ebx
push esi
call fcn.0046f200
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x41f02c
sub eax, ecx
sar eax, 1
xor ecx, ecx
mov word [esi + eax*2], cx
dec esi
dec esi
mov eax, esi
mov cx, word [eax + 2]
inc eax
inc eax
test cx, cx
jne 0x41f044
mov edi, eax
jmp 0x41f0b7
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x41f05f
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
add ebx, 0x60a4
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x41f071
mov esi, dword [ebp - 0x50]
sub eax, edx
sar eax, 1
add eax, eax
push eax
push ebx
push esi
call fcn.0046f200
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x41f094
sub eax, ecx
sar eax, 1
xor ecx, ecx
mov word [esi + eax*2], cx
dec esi
dec esi
mov ax, word [esi + 2]
inc esi
inc esi
test ax, ax
jne 0x41f0aa
mov edi, esi
mov esi, str._Dir
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x54]
push 0
mov dword [ecx], eax
push 1
lea ecx, [ebp - 0x24]
call fcn.00401a58
push 0
push 1
lea ecx, [ebp - 0x40]
call fcn.00401a58
mov eax, 0x86180003
jmp 0x41f1d8
add ebx, 0x60a4
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x41f0f8
mov esi, dword [ebp - 0x50]
sub eax, edx
sar eax, 1
add eax, eax
push eax
push ebx
push esi
call fcn.0046f200
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x41f11b
sub eax, ecx
sar eax, 1
xor ecx, ecx
mov word [esi + eax*2], cx
dec esi
dec esi
mov eax, esi
mov cx, word [eax + 2]
inc eax
inc eax
test cx, cx
jne 0x41f133
mov edi, eax
mov eax, dword [ebp - 0x4c]
mov esi, str._Open
movsd dword es:[edi], dword [esi]
neg eax
sbb eax, eax
movsd dword es:[edi], dword [esi]
and eax, 3
add eax, 0x86180003
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x5c], eax
jmp 0x41f1be
add ebx, 0x60a4
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x41f167
mov esi, dword [ebp - 0x50]
sub eax, edx
sar eax, 1
add eax, eax
push eax
push ebx
push esi
call fcn.0046f200
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x41f18a
sub eax, ecx
sar eax, 1
xor ecx, ecx
mov word [esi + eax*2], cx
dec esi
dec esi
mov ax, word [esi + 2]
inc esi
inc esi
test ax, ax
jne 0x41f1a0
mov edi, esi
mov esi, str._Write
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 0x5c], 0x86180003
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x54]
push 0
mov dword [ecx], eax
push 1
lea ecx, [ebp - 0x40]
call fcn.00401a58
mov eax, dword [ebp - 0x5c]
pop edi
mov ecx, dword [ebp + 0x408]
pop esi
xor ecx, ebp
pop ebx
call fcn.0046cc2a
add ebp, 0x40c
leave
ret