Function at 0x407b30
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Query environment variable
Read file on windows
Set file attributes
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
mov eax, dword [0x43a004]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [0x43bbe4], 0
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
mov dword [ebp - 0x438], esi
jne 0x407e88
cmp dword [ebp + 0x10], 0
je 0x407bea
push 0
push 0
push 3
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x407c18
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x45c]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
test eax, eax
je 0x407edc
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x43bbd4], 1
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push ebx
mov dword [ebp - 0x444], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x430], eax
cmp eax, 0xffffffff
jne 0x407c30
push ebx
push 0x140
push 0x44a060
call fcn.0041cd80
add esp, 0xc
jmp 0x407e7e
push 0
push 0
lea ecx, [ebp - 0x454]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
and ecx, 4
mov dword [ebp - 0x44c], ecx
je 0x407d6f
push 0x104
lea eax, [ebp - 0x214]
push eax
push str.TEMP
call edi
lea edi, [ebp - 0x214]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x407c80
mov eax, dword [0x437300]
push 0x5c
push ebx
mov dword [edi], eax
call fcn.0041df18
add esp, 8
lea edx, [eax + 2]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x407ca3
lea edi, [ebp - 0x214]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x407cc0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x214]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x407ce3
mov eax, dword [0x437304]
mov dword [ecx], eax
mov eax, dword [str.ecrypt]
mov dword [ecx + 4], eax
mov eax, dword [0x43730c]
mov dword [ecx + 8], eax
mov eax, dword [0x437310]
push 8
push 0
mov dword [ecx + 0xc], eax
mov ax, word [0x437314]
push 0
mov word [ecx + 0x10], ax
lea eax, [ebp - 0x214]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
test eax, eax
jne 0x407d43
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407e7e
lea ecx, [ebp - 0x214]
mov edx, ebx
mov eax, ecx
sub edx, eax
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x407d50
mov esi, dword [ebp - 0x438]
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov eax, dword [ebp + 0xc]
and eax, 0x80
mov dword [ebp - 0x448], eax
je 0x407e10
lea edx, [ebp - 0x41c]
mov ecx, esi
sub edx, esi
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x407d90
push 0x104
push esi
push str.TEMP
call edi
lea edi, [esi - 2]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x407db0
mov eax, dword [0x437300]
mov dword [edi], eax
lea eax, [ebp - 0x41c]
push 0x5c
push eax
call fcn.0041df18
add esp, 8
lea edx, [eax + 2]
mov ecx, edx
mov dword [ebp - 0x43c], ecx
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x407de0
sub edx, ecx
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x407df0
mov esi, dword [ebp - 0x43c]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x438]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp eax, 0xffffffff
je 0x407e41
test al, 0x10
jne 0x407e41
cmp dword [ebp + 8], 0
jne 0x407e9b
push 0x80
push esi
call edx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push esi
call eax
mov edi, eax
cmp edi, 0xffffffff
jne 0x407f2d
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x67
mov ecx, 0x44a060
call fcn.0041cc00
mov dword [0x43bbd4], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x43c], 0
mov eax, esi
mov cx, word [eax]
cmp cx, word [ebx]
jne 0x407ecd
test cx, cx
je 0x407ec9
mov cx, word [eax + 2]
cmp cx, word [ebx + 2]
jne 0x407ecd
add eax, 4
add ebx, 4
test cx, cx
jne 0x407ea7
xor eax, eax
jmp 0x407ed2
sbb eax, eax
or eax, 1
test eax, eax
jne 0x407ef5
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
push 0x80
push esi
call edx
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push esi
call eax
mov edi, eax
lea eax, [ebp - 0x43c]
push 2
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x407e5a
push 4
push 0x1000
push 0x4000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x407f62
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0x430]
call esi
mov edx, 0x6d
jmp 0x407e74
mov ebx, dword [ebp + 0xc]
and ebx, 1
mov dword [ebp + 0xc], ebx
nop dword [eax + eax]
push 0
lea eax, [ebp - 0x434]
push eax
push 0x4000
push esi
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test ebx, ebx
mov ebx, dword [ebp - 0x434]
je 0x407fa5
push ebx
push 0x1a
push esi
call fcn.00430e80
add esp, 0xc
test eax, eax
jne 0x407fdb
push 0
test ebx, ebx
je 0x408033
lea eax, [ebp - 0x440]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x440]
cmp eax, dword [ebp - 0x434]
jne 0x408000
cmp dword [0x43bbe4], 0
jne 0x408000
mov ebx, dword [ebp + 0xc]
jmp 0x407f70
sub eax, esi
inc eax
push 0
mov dword [ebp - 0x434], eax
lea eax, [ebp - 0x454]
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40805f
mov edx, 0x142
mov ecx, 0x44a060
call fcn.0041cc00
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0x430]
call esi
jmp 0x407e7e
push 0
lea eax, [ebp - 0x454]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0xc], 0
je 0x40805f
push 0
lea eax, [ebp - 0x440]
mov byte [esi], 0x1a
push eax
push 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0x430]
call esi
push dword [ebp - 0x444]
mov esi, dword [ebp - 0x438]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x448], 0
je 0x4080de
push 2
push 0
push 0
push 0
lea eax, [ebp - 0x41c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileExW]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4080da
mov dword [0x43bbd4], 1
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
call esi
jmp 0x4080e4
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x44c], 0
je 0x4080f6
lea eax, [ebp - 0x214]
push eax
call esi
mov ecx, dword [ebp - 8]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d22b
mov esp, ebp
pop ebp
ret