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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x864
or dword [ebp - 8], 0xffffffff
or dword [ebp - 0x10], 0xffffffff
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x38], ebx
call fcn.00409d3b
test eax, eax
mov eax, dword [0x421178]
je 0x4032b4
cmp eax, ebx
jne 0x4032bc
push 1
pop eax
jmp 0x403386
cmp eax, ebx
je 0x40338b
push str._MSSETUP.BAT
push 0x424460
lea eax, [ebp - 0x24c]
push 0x41c268
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0xc
mov dword [ebp - 0x30], ebx
push ebx
push 0x80
push 4
push eax
push ebx
lea eax, [ebp - 0x24c]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 8], edi
je 0x403416
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x1c]
push ebx
push eax
push dword [0x424fa0]
call esi
push eax
push dword [0x424fa0]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403416
push dword [0x424fa0]
call esi
cmp dword [ebp - 0x1c], eax
jne 0x403359
push 1
pop esi
mov dword [ebp - 0x38], esi
cmp dword [ebp - 8], 0xffffffff
je 0x403368
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0xffffffff
je 0x403377
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x424fa0]
call fcn.0040a059
mov eax, dword [ebp - 0x38]
pop ecx
pop edi
pop esi
pop ebx
leave
ret
call fcn.00409d77
test eax, eax
je 0x403359
mov esi, str._rename_
lea edi, [ebp - 0x44]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push str.WININIT.INI
push 0x424460
lea eax, [ebp - 0x24c]
push 0x41c268
push eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], ebx
mov byte [ebp - 9], 0x20
mov dword [ebp - 0x28], ebx
movsb byte es:[edi], byte [esi]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x24c]
push eax
call fcn.00406412
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
pop ecx
test eax, eax
je 0x403427
push ebx
push 0x80
lea eax, [ebp - 0x34]
push 4
push eax
push ebx
lea eax, [ebp - 0x24c]
push SysReAllocStringLen
push eax
mov dword [ebp - 0x34], 0xc
mov dword [ebp - 0x30], ebx
call edi
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
jne 0x403432
push dword [0x42468c]
push 1
push 0x10
push 1
jmp 0x4036c6
push 1
pop esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
jmp 0x403435
push 1
pop esi
lea eax, [ebp - 0x65c]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x403359
lea eax, [ebp - 0x454]
push eax
push ebx
lea eax, [ebp - 0x65c]
push 0x41c24c
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x403359
push ebx
push 0x80
lea eax, [ebp - 0x34]
push 4
push eax
push ebx
lea eax, [ebp - 0x454]
push 0x40000000
push eax
mov dword [ebp - 0x34], 0xc
mov dword [ebp - 0x30], ebx
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x4034bf
lea eax, [ebp - 0x454]
push eax
lea eax, [ebp - 0x864]
push str.Couldnt_create_Temp_Reboot_File:__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x4036bc
cmp dword [ebp - 0x18], ebx
jne 0x4035a9
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 1]
push esi
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4036bc
cmp dword [ebp - 0x14], ebx
jne 0x4034f9
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
jmp 0x403597
cmp byte [ebp - 1], 0x5b
jne 0x403576
cmp dword [ebp - 0x24], ebx
jne 0x40350a
cmp byte [ebp - 9], 0xa
jne 0x403576
cmp dword [ebp - 0x28], ebx
jne 0x40356a
push esi
push ebx
push 0xffffffffffffffff
push dword [ebp - 8]
call edi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4036bc
push 9
push str._rename_
lea eax, [ebp - 0x44]
push 9
push eax
push esi
push 0x800
call dword [sym.imp.KERNEL32.dll_CompareStringA]
cmp eax, 2
jne 0x403561
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x24]
push ebx
inc eax
push ebx
push eax
jmp 0x403571
push esi
push ebx
mov dword [ebp - 0x18], esi
push 0xffffffffffffffff
push dword [ebp - 8]
call edi
cmp dword [ebp - 0x18], ebx
jne 0x403597
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 1]
push esi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x14], esi
jne 0x4036bc
mov al, byte [ebp - 1]
cmp dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
mov byte [ebp - 9], al
je 0x4034ce
cmp dword [ebp - 0x28], ebx
jne 0x4035e2
lea eax, [ebp - 0x1c]
push ebx
mov edi, str._rename_
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4036bc
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0x1c], eax
jne 0x403359
lea eax, [ebp - 0x1c]
push ebx
push eax
push dword [0x424fa0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push dword [0x424fa0]
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x4036bc
push dword [0x424fa0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0x1c], eax
jne 0x403359
cmp dword [ebp - 0x20], ebx
jne 0x40365e
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 1]
push esi
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4036bc
cmp dword [ebp - 0x14], ebx
jne 0x403648
mov dword [ebp - 0x20], esi
jmp 0x403622
lea eax, [ebp - 0x14]
push ebx
push eax
lea eax, [ebp - 1]
push esi
push eax
push dword [ebp - 0x10]
call edi
cmp dword [ebp - 0x14], esi
jne 0x4036bc
jmp 0x403622
cmp dword [ebp - 8], 0xffffffff
je 0x403671
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 8], 0xffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x24c]
push eax
call fcn.00406412
test eax, eax
pop ecx
je 0x4036a0
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4036bc
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x454]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x403356
push dword [0x42468c]
push esi
push 0x10
push esi
call fcn.00405105
add esp, 0x10
jmp 0x403359