Function at 0x408f3e
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c0
push ebx
push esi
push edi
mov esi, 0x41bb04
lea edi, [ebp - 0x24]
xor ebx, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x80
mov byte [ebp - 1], bl
push esi
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_SetFileAttributesA]
test eax, eax
je 0x409048
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_DeleteFileA]
test eax, eax
je 0x408f85
mov al, 1
jmp 0x4091e0
push 0x24
xor eax, eax
pop ecx
lea edi, [ebp - 0xb4]
mov dword [ebp - 0xb8], 0x94
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xb8]
push eax
call dword [sym.imp.kernel32.dll_GetVersionExA]
test eax, eax
je 0x409048
cmp dword [ebp - 0xa8], 2
jne 0x408fec
push 0x41baf4
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
push 0x41bae8
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
cmp eax, ebx
je 0x4091dd
push 4
push ebx
push dword [ebp + 8]
call eax
test eax, eax
setne byte [ebp - 1]
jmp 0x4091dd
lea eax, [ebp - 0x4c0]
push 0x104
push eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x409048
lea eax, [ebp - 0x4c0]
push eax
lea eax, [ebp - 0x3bc]
push eax
call fcn.0040bb60
lea eax, [ebp - 0x3bc]
push 0x41bad8
push eax
call fcn.0040bb70
add esp, 0x10
lea eax, [ebp - 0x3bc]
push ebx
push esi
push 4
push ebx
push ebx
push 0xc0000000
push eax
call dword [sym.imp.kernel32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40904f
xor al, al
jmp 0x4091e0
push ebx
push edi
call dword [sym.imp.kernel32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x4091d6
lea esi, [eax + 1]
push esi
call fcn.0040d003
push esi
mov dword [ebp - 8], eax
call fcn.0040d003
push esi
push ebx
push dword [ebp - 8]
mov dword [ebp - 0x10], eax
call fcn.0040bc80
push esi
mov esi, dword [ebp - 0x10]
push ebx
push esi
call fcn.0040bc80
add esp, 0x20
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [ebp - 0x14]
push dword [ebp - 8]
push edi
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x4091ba
push dword [ebp - 8]
push esi
call fcn.0040bb60
push esi
call fcn.0040e701
lea eax, [ebp - 0x24]
push eax
push esi
call fcn.0040c9d0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2b8]
push 0x41bad0
push eax
call fcn.0040bb60
push dword [ebp + 8]
lea eax, [ebp - 0x2b8]
push eax
call fcn.0040bb70
mov esi, 0x41bacc
lea eax, [ebp - 0x2b8]
push esi
push eax
call fcn.0040bb70
add esp, 0x2c
cmp dword [ebp - 0x14], ebx
jne 0x409122
push 2
push ebx
push ebx
push edi
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4091ba
lea eax, [ebp - 0xc]
push ebx
push eax
push 0xc
push 0x41babc
jmp 0x409139
push esi
push dword [ebp - 0x14]
call fcn.0040c9d0
pop ecx
cmp eax, ebx
pop ecx
jne 0x40915d
lea eax, [ebp - 0xc]
push ebx
push eax
push 2
push esi
mov esi, dword [sym.imp.kernel32.dll_WriteFile]
push edi
call esi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x2b8]
push eax
call fcn.0040c050
pop ecx
push eax
lea eax, [ebp - 0x2b8]
jmp 0x4091b2
sub eax, dword [ebp - 0x10]
push ebx
push ebx
inc eax
inc eax
push eax
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4091ba
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x2b8]
push eax
call fcn.0040c050
mov esi, dword [sym.imp.kernel32.dll_WriteFile]
pop ecx
push eax
lea eax, [ebp - 0x2b8]
push eax
push edi
call esi
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 8]
call fcn.0040c050
pop ecx
mov ecx, eax
mov eax, dword [ebp + 8]
sub ecx, eax
push ecx
mov ecx, dword [ebp - 8]
add eax, ecx
push eax
push edi
call esi
mov byte [ebp - 1], 1
cmp dword [ebp - 8], ebx
je 0x4091c8
push dword [ebp - 8]
call fcn.0040b5d6
pop ecx
cmp dword [ebp - 0x10], ebx
je 0x4091d6
push dword [ebp - 0x10]
call fcn.0040b5d6
pop ecx
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret