Function at 0x40a710
Capabilities:
Copy file
Delete file
Get common file path
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x3838
call fcn.0041db80
mov eax, dword [0x43bff0]
xor eax, esp
mov dword [esp + 0x3834], eax
mov eax, dword [esp + 0x383c]
push esi
mov esi, ecx
test esi, esi
push edi
mov edi, edx
mov dword [esp + 0x30], eax
jne 0x40a756
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x3834]
xor ecx, esp
call fcn.004194fa
add esp, 0x3838
ret
cmp word [esi], 0
je 0x40a73d
mov eax, str.AutoUpdate
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a764
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0x200
sub eax, edx
lea ecx, [esp + 0x14c]
push ecx
sar eax, 1
push eax
push str.AutoUpdate
push 0
push 1
call ebx
mov byte [esp + eax + 0x140], 0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a7a4
push ebp
push 0
push 0
push 0x100
sub eax, edx
lea edx, [esp + 0x50]
push edx
sar eax, 1
push eax
push esi
push 0
push 1
call ebx
xor ebp, ebp
test edi, edi
mov byte [esp + eax + 0x44], 0
mov dword [esp + 0x18], ebp
je 0x40a828
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a7e0
sub eax, edx
sar eax, 1
lea esi, [eax + eax + 1]
push esi
call fcn.0041a2d1
mov ebp, eax
mov eax, edi
add esp, 4
mov dword [esp + 0x18], ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a807
push 0
push 0
push esi
push ebp
sub eax, edx
sar eax, 1
push eax
push edi
push 0
push 1
call ebx
mov byte [eax + ebp], 0
mov edi, dword [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push edi
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x40a933
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edi
call esi
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a888
test ebp, ebp
je 0x40a9fb
push ebp
call fcn.004195f1
add esp, 4
xor eax, eax
jmp 0x40ae9a
lea eax, [esp + 0x144]
push eax
lea ecx, [esp + 0x648]
push str.__s__r_n
push ecx
call fcn.0041a207
lea eax, [esp + 0x650]
add esp, 0xc
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a8b0
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
sub eax, edx
push 0
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x650]
push eax
push esi
call edi
test ebp, ebp
je 0x40a91e
push ebp
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x64c]
push str._s_s_r_n
push edx
call fcn.0041a207
lea eax, [esp + 0x654]
add esp, 0x10
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a900
push 0
lea ecx, [esp + 0x18]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x650]
push edx
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x40ae95
push ebp
jmp 0x40ae8d
lea eax, [esp + 0x2644]
push eax
lea ebx, [esp + 0x648]
push 0x100
mov dword [esp + 0x2c], ebx
lea edi, [esp + 0x284c]
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [esp + 0x344]
push ecx
push 0
push 0x435b04
lea edx, [esp + 0x2650]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [esp + 0x35c]
push eax
call esi
mov ecx, dword [esp + 0x1c]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40a9bb
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40a9fb
push eax
call fcn.004195f1
add esp, 4
xor eax, eax
jmp 0x40ae9a
push 0
lea edx, [esp + 0x24]
push edx
push 0x1000
lea eax, [esp + 0x650]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40aa02
mov edx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
push ebp
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40a9fb
push eax
call fcn.004195f1
add esp, 4
xor eax, eax
jmp 0x40ae9a
mov ecx, dword [esp + 0x20]
xor esi, esi
cmp ecx, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x2c], esi
jbe 0x40adb5
cmp ecx, 0x1000
jae 0x40aa4b
cmp byte [esp + ecx + 0x643], 0xa
lea eax, [esp + ecx + 0x644]
je 0x40aa4b
mov byte [eax], 0xa
mov ecx, dword [esp + 0x20]
add ecx, 1
mov dword [esp + 0x20], ecx
lea ecx, [esp + ecx + 0x644]
lea eax, [esp + 0x644]
cmp eax, ecx
jae 0x40aaa9
jmp 0x40aa64
mov ebx, dword [esp + 0x24]
mov al, byte [ebx]
cmp al, 0xd
je 0x40ab6b
cmp al, 0xa
je 0x40ab67
mov byte [edi], al
add esi, 1
add edi, 1
cmp esi, 0x1000
jl 0x40aa8f
xor esi, esi
lea edi, [esp + 0x2844]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
add eax, 1
lea ecx, [esp + ecx + 0x644]
cmp eax, ecx
mov dword [esp + 0x24], eax
jb 0x40aa60
mov edx, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x24]
push eax
lea ebx, [esp + 0x64c]
push 0x1000
mov ecx, ebx
push ecx
push edx
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40aade
mov ecx, dword [esp + 0x20]
test ecx, ecx
ja 0x40aa24
cmp dword [esp + 0x30], 0
je 0x40adaa
cmp dword [esp + 0x28], 0
je 0x40ae51
cmp dword [esp + 0x34], 0
jne 0x40ae51
cmp dword [esp + 0x2c], 0
jne 0x40ae51
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40ae55
push edi
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x164c]
push str._s_s_r_n
push ecx
call fcn.0041a207
lea eax, [esp + 0x1654]
add esp, 0x10
lea edx, [eax + 1]
jmp 0x40ab40
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ab40
sub eax, edx
push 0
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1650]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40ae55
cmp al, 0xd
jne 0x40abad
add ecx, 0xffffffff
cmp ebx, ecx
jae 0x40ab7b
mov cl, byte [ebx + 1]
mov byte [esp + 0x13], cl
jmp 0x40ab9f
mov ecx, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x44]
push edx
push 1
lea eax, [esp + 0x1f]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x40], 0
je 0x40aaa9
cmp byte [esp + 0x13], 0xa
jne 0x40abb2
add ebx, 1
mov dword [esp + 0x24], ebx
mov byte [esp + 0x13], 0
lea ebx, [esp + 0x544]
lea esi, [esp + 0x2844]
mov byte [edi], 0
call fcn.0040a210
test eax, eax
je 0x40acb1
lea edx, [esp + 0x144]
push edx
mov eax, ebx
push eax
call fcn.0041b902
add esp, 8
test eax, eax
jne 0x40abf6
mov eax, 1
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], eax
jmp 0x40ac6a
cmp dword [esp + 0x30], 0
mov dword [esp + 0x28], 0
je 0x40ac6a
cmp dword [esp + 0x34], 0
jne 0x40ac6a
cmp dword [esp + 0x2c], 0
jne 0x40ac6a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40ac6a
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x164c]
push str._s_s_r_n
push edx
call fcn.0041a207
lea eax, [esp + 0x1654]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ac40
push 0
lea ecx, [esp + 0x18]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x1650]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x2c], 1
lea eax, [esp + 0x2844]
push eax
lea ecx, [esp + 0x1648]
push str._s_r_n
push ecx
call fcn.0041a207
lea eax, [esp + 0x1650]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ac91
sub eax, edx
push 0
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1650]
push eax
jmp 0x40ad7b
cmp dword [esp + 0x28], 0
je 0x40ad32
lea ecx, [esp + 0x3c]
push ecx
push 0
lea edx, [esp + 0x4c]
push 0
push edx
lea edi, [esp + 0x2854]
call fcn.0040a0f0
add esp, 0x10
test eax, eax
je 0x40ad32
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40ad28
push eax
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x164c]
push str._s_s_r_n
push ecx
call fcn.0041a207
lea eax, [esp + 0x1654]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ad06
sub eax, edx
push 0
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1650]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x34], 1
jmp 0x40ad82
lea ecx, [esp + 0x2844]
push ecx
lea edx, [esp + 0x1648]
push str._s_r_n
push edx
call fcn.0041a207
lea eax, [esp + 0x1650]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ad60
push 0
lea ecx, [esp + 0x18]
sub eax, edx
push ecx
push eax
lea edx, [esp + 0x1650]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov al, byte [esp + 0x13]
xor esi, esi
test al, al
lea edi, [esp + 0x2844]
je 0x40aa8f
mov byte [esp + 0x2844], al
lea edi, [esp + 0x2845]
jmp 0x40aa8f
cmp dword [esp + 0x2c], 0
jne 0x40ae51
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x648]
push str.__s__r_n
push edx
call fcn.0041a207
lea eax, [esp + 0x650]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ade0
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x18]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x650]
push edx
push ebp
call esi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40ae55
push edi
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x164c]
push str._s_s_r_n
push ecx
call fcn.0041a207
lea eax, [esp + 0x1654]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ae31
sub eax, edx
push 0
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1650]
push eax
push ebp
call esi
jmp 0x40ae55
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
push ebp
call esi
mov edx, dword [esp + 0x38]
push 0
push edx
lea eax, [esp + 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0x344]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test edi, edi
je 0x40ae95
push edi
call fcn.004195f1
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x3844]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
call fcn.004194fa
add esp, 0x3838
ret