Function at 0x40322c
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.00409bf1
test eax, eax
mov eax, dword [0x4210a8]
je 0x40325f
cmp eax, ebx
jne 0x403267
push 1
pop eax
jmp 0x403331
cmp eax, ebx
je 0x403336
push str._MSSETUP.BAT
push 0x424aa0
lea eax, [ebp - 0x24c]
push 0x41c1a4
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 0x4033c1
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 [0x424ee0]
call esi
push eax
push dword [0x424ee0]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4033c1
push dword [0x424ee0]
call esi
cmp dword [ebp - 0x1c], eax
jne 0x403304
push 1
pop esi
mov dword [ebp - 0x38], esi
cmp dword [ebp - 8], 0xffffffff
je 0x403313
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0xffffffff
je 0x403322
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x424ee0]
call fcn.00409f06
mov eax, dword [ebp - 0x38]
pop ecx
pop edi
pop esi
pop ebx
leave
ret
call fcn.00409c1f
test eax, eax
je 0x403304
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 0x424aa0
lea eax, [ebp - 0x24c]
push 0x41c1a4
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.00409f75
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
pop ecx
test eax, eax
je 0x4033d2
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 0x4033dd
push dword [0x424194]
push 1
push 0x10
push 1
jmp 0x403672
push 1
pop esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
jmp 0x4033e0
push 1
pop esi
lea eax, [ebp - 0x65c]
push eax
push 0x208
call fcn.0040372a
pop ecx
test eax, eax
pop ecx
je 0x403304
lea eax, [ebp - 0x454]
push eax
push ebx
lea eax, [ebp - 0x65c]
push 0x41c188
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x403304
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 0x40346b
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 0x403668
cmp dword [ebp - 0x18], ebx
jne 0x403555
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 0x403668
cmp dword [ebp - 0x14], ebx
jne 0x4034a5
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
jmp 0x403543
cmp byte [ebp - 1], 0x5b
jne 0x403522
cmp dword [ebp - 0x24], ebx
jne 0x4034b6
cmp byte [ebp - 9], 0xa
jne 0x403522
cmp dword [ebp - 0x28], ebx
jne 0x403516
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 0x403668
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 0x40350d
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x24]
push ebx
inc eax
push ebx
push eax
jmp 0x40351d
push esi
push ebx
mov dword [ebp - 0x18], esi
push 0xffffffffffffffff
push dword [ebp - 8]
call edi
cmp dword [ebp - 0x18], ebx
jne 0x403543
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 0x403668
mov al, byte [ebp - 1]
cmp dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
mov byte [ebp - 9], al
je 0x40347a
cmp dword [ebp - 0x28], ebx
jne 0x40358e
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 0x403668
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0x1c], eax
jne 0x403304
lea eax, [ebp - 0x1c]
push ebx
push eax
push dword [0x424ee0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push dword [0x424ee0]
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x403668
push dword [0x424ee0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0x1c], eax
jne 0x403304
cmp dword [ebp - 0x20], ebx
jne 0x40360a
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 0x403668
cmp dword [ebp - 0x14], ebx
jne 0x4035f4
mov dword [ebp - 0x20], esi
jmp 0x4035ce
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 0x403668
jmp 0x4035ce
cmp dword [ebp - 8], 0xffffffff
je 0x40361d
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.00409f75
test eax, eax
pop ecx
je 0x40364c
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x403668
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x454]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x403301
push dword [0x424194]
push esi
push 0x10
push esi
call fcn.0040523a
add esp, 0x10
jmp 0x403304