Function at 0x4031fc
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.00409aae
test eax, eax
mov eax, dword [0x4210a8]
je 0x40322f
cmp eax, ebx
jne 0x403237
push 1
pop eax
jmp 0x403301
cmp eax, ebx
je 0x403306
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 0x403391
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 0x403391
push dword [0x424ee0]
call esi
cmp dword [ebp - 0x1c], eax
jne 0x4032d4
push 1
pop esi
mov dword [ebp - 0x38], esi
cmp dword [ebp - 8], 0xffffffff
je 0x4032e3
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0xffffffff
je 0x4032f2
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x424ee0]
call fcn.00409dc3
mov eax, dword [ebp - 0x38]
pop ecx
pop edi
pop esi
pop ebx
leave
ret
call fcn.00409adc
test eax, eax
je 0x4032d4
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.00409e32
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
pop ecx
test eax, eax
je 0x4033a2
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 0x4033ad
push dword [0x424194]
push 1
push 0x10
push 1
jmp 0x403642
push 1
pop esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
jmp 0x4033b0
push 1
pop esi
lea eax, [ebp - 0x65c]
push eax
push 0x208
call fcn.004036fa
pop ecx
test eax, eax
pop ecx
je 0x4032d4
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 0x4032d4
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 0x40343b
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 0x403638
cmp dword [ebp - 0x18], ebx
jne 0x403525
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 0x403638
cmp dword [ebp - 0x14], ebx
jne 0x403475
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
jmp 0x403513
cmp byte [ebp - 1], 0x5b
jne 0x4034f2
cmp dword [ebp - 0x24], ebx
jne 0x403486
cmp byte [ebp - 9], 0xa
jne 0x4034f2
cmp dword [ebp - 0x28], ebx
jne 0x4034e6
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 0x403638
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 0x4034dd
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x24]
push ebx
inc eax
push ebx
push eax
jmp 0x4034ed
push esi
push ebx
mov dword [ebp - 0x18], esi
push 0xffffffffffffffff
push dword [ebp - 8]
call edi
cmp dword [ebp - 0x18], ebx
jne 0x403513
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 0x403638
mov al, byte [ebp - 1]
cmp dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
mov byte [ebp - 9], al
je 0x40344a
cmp dword [ebp - 0x28], ebx
jne 0x40355e
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 0x403638
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0x1c], eax
jne 0x4032d4
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 0x403638
push dword [0x424ee0]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0x1c], eax
jne 0x4032d4
cmp dword [ebp - 0x20], ebx
jne 0x4035da
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 0x403638
cmp dword [ebp - 0x14], ebx
jne 0x4035c4
mov dword [ebp - 0x20], esi
jmp 0x40359e
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 0x403638
jmp 0x40359e
cmp dword [ebp - 8], 0xffffffff
je 0x4035ed
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.00409e32
test eax, eax
pop ecx
je 0x40361c
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x403638
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x454]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x4032d1
push dword [0x424194]
push esi
push 0x10
push esi
call fcn.0040520a
add esp, 0x10
jmp 0x4032d4