Function at 0x40675f
Capabilities:
Delete file
Get common file path
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov eax, 0xffffffff
mov ebp, esp
sub esp, 0x868
push ebx
mov dword [ebp - 8], eax
push esi
mov dword [ebp - 0xc], eax
push edi
xor esi, esi
mov dword [ebp - 0x2c], esi
call fcn.0040b5ca
test eax, eax
je 0x406796
cmp dword [0x40f740], esi
jne 0x406796
mov eax, 1
jmp 0x406d03
xor esi, esi
cmp dword [0x40f740], esi
je 0x406870
push str._MSSETUP.BAT
lea eax, [ebp - 0x250]
push 0x412ff0
push 0x410674
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0xc
push esi
mov dword [ebp - 0x24], esi
push pe_nt_image_headers32
lea ecx, [ebp - 0x250]
push 4
push eax
push esi
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x40680d
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
push 2
xor esi, esi
push esi
push esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x18]
push eax
mov esi, dword [0x412724]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406856
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov eax, dword [0x412724]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, dword [ebp - 0x18]
je 0x406ccd
jmp 0x406cd4
call fcn.0040b609
test eax, eax
je 0x406cd4
xor ebx, ebx
mov eax, str._rename_
mov esi, eax
lea edi, [ebp - 0x3c]
mov dword [ebp - 0x30], 1
mov byte [ebp - 0x251], 0x20
mov dword [ebp - 0x14], ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, eax
lea edi, [ebp - 0x48]
movsd dword es:[edi], dword [esi]
push str.WININIT.INI
lea ecx, [ebp - 0x250]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push 0x412ff0
mov dword [ebp - 0x1c], ebx
push 0x410674
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x250]
push ecx
call fcn.0040b922
add esp, 4
test eax, eax
je 0x406924
push ebx
lea eax, [ebp - 0x28]
push pe_nt_image_headers32
mov dword [ebp - 0x24], ebx
push 4
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x28], 0xc
push eax
push ebx
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x40692c
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov ebx, 1
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x868]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x406cd4
lea eax, [ebp - 0x660]
xor esi, esi
push eax
lea ecx, [ebp - 0x868]
push esi
push 0x410a78
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x406cd4
push esi
lea eax, [ebp - 0x28]
push pe_nt_image_headers32
mov dword [ebp - 0x24], esi
push 4
lea ecx, [ebp - 0x660]
mov dword [ebp - 0x28], 0xc
push eax
push esi
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x4069d0
lea eax, [ebp - 0x660]
lea ecx, [ebp - 0x458]
push eax
push str.Couldnt_create_Temp_Reboot_File:__s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [0x413218]
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
cmp dword [ebp - 0x14], 0
jne 0x406ad3
mov esi, 1
xor edi, edi
push edi
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 1]
push esi
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406b17
cmp dword [ebp - 0x10], edi
jne 0x406a0b
mov ebx, esi
mov dword [ebp - 0x14], esi
jmp 0x406abe
cmp byte [ebp - 1], 0x5b
jne 0x406a9d
cmp dword [ebp - 0x30], edi
jne 0x406a23
cmp byte [ebp - 0x251], 0xa
jne 0x406a9d
cmp dword [ebp - 0x1c], edi
jne 0x406a8d
push esi
push edi
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x254], eax
lea eax, [ebp - 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0x3c]
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406b30
push 9
lea eax, [ebp - 0x3c]
push str._rename_
push 9
push eax
push esi
push 0x800
call dword [sym.imp.KERNEL32.dll_CompareStringA]
cmp eax, 2
jne 0x406a81
mov dword [ebp - 0x1c], esi
push edi
mov eax, dword [ebp - 0x254]
push edi
inc eax
push eax
jmp 0x406a94
push esi
mov dword [ebp - 0x14], esi
push edi
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], edi
jne 0x406abe
push edi
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 1]
push esi
push ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x10], esi
jne 0x406b49
mov al, byte [ebp - 1]
mov dword [ebp - 0x30], edi
mov byte [ebp - 0x251], al
cmp dword [ebp - 0x14], edi
je 0x4069e1
cmp dword [ebp - 0x1c], 0
jne 0x406b76
push 0
lea eax, [ebp - 0x18]
push eax
mov esi, str._rename_
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406b62
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
push str._rename_
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, dword [ebp - 0x18]
jne 0x406cd4
push 0
lea eax, [ebp - 0x18]
push eax
push dword [0x412724]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [0x412724]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406bb5
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov eax, dword [0x412724]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, dword [ebp - 0x18]
jne 0x406cd4
xor esi, esi
mov edi, 1
test ebx, ebx
jne 0x406c3f
push esi
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 1]
push edi
push ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406c26
cmp dword [ebp - 0x10], esi
jne 0x406bf5
mov ebx, edi
jmp 0x406bd1
push esi
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 1]
push edi
push ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x10], edi
je 0x406bd1
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
cmp dword [ebp - 8], 0xffffffff
je 0x406c55
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], 0xffffffff
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc], 0xffffffff
lea eax, [ebp - 0x250]
push eax
call fcn.0040b922
add esp, 4
test eax, eax
je 0x406c9f
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x406c9f
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
lea eax, [ebp - 0x250]
lea ecx, [ebp - 0x660]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x406ccd
mov eax, dword [0x413218]
push eax
push 1
push 0x10
push 1
call fcn.004027d8
add esp, 0x10
jmp 0x406cd4
mov dword [ebp - 0x2c], 1
cmp dword [ebp - 8], 0xffffffff
je 0x406ce3
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], 0xffffffff
je 0x406cf2
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x412724]
push eax
call fcn.0040b8a1
add esp, 4
mov eax, dword [ebp - 0x2c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret