Function at 0x40379a
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x108c
call fcn.00404310
push ebx
push esi
push edi
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
mov edi, 0x400
lea eax, [ebp - 0xc8c]
push edi
push eax
push 6
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x784]
push 0x104
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x784]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
jne 0x403821
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
lea eax, [ebp - 0x67c]
push edi
push eax
jne 0x40381d
push 2
push dword [ebp + 8]
call esi
jmp 0x403b8e
push 5
jmp 0x403813
push ebx
push eax
mov dword [ebp - 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x38
mov dword [ebp - 0x1c], eax
jb 0x4038ef
push 2
push ebx
push 0xffffffffffffffc8
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x58]
push 0x38
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [ebp - 0x50], 0x44
jne 0x4038ef
cmp byte [ebp - 0x4f], 0x57
jne 0x4038ef
cmp byte [ebp - 0x4e], 0x34
jne 0x4038ef
cmp byte [ebp - 0x4d], 0x30
jne 0x4038ef
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x40]
add ecx, eax
lea ecx, [ecx + edx + 0x38]
cmp dword [ebp - 0x1c], ecx
jb 0x4038ef
cmp dword [ebp - 0x24], edi
jne 0x4038ef
mov ecx, dword [ebp - 0x44]
lea esi, [eax + ecx]
push esi
call fcn.00403d88
pop ecx
mov dword [ebp - 0x10], eax
push ebx
push ebx
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push ebx
push eax
push esi
push dword [ebp - 0x10]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xc], esi
jne 0x4038e9
lea eax, [ebp - 0x6c]
push eax
push esi
push dword [ebp - 0x10]
call fcn.0040176b
lea eax, [ebp - 0x6c]
push 8
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00404260
add esp, 0x18
test eax, eax
je 0x403907
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x67c]
push edi
push eax
push 1
jmp 0x403813
mov esi, 0x105
lea eax, [ebp - 0x88c]
push esi
push ebx
push eax
call fcn.004040e0
push esi
lea eax, [ebp - 0x174]
push ebx
push eax
call fcn.004040e0
push esi
lea eax, [ebp - 0x27c]
push ebx
push eax
call fcn.004040e0
add esp, 0x24
lea eax, [ebp - 0x88c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x27c]
push eax
push ebx
lea eax, [ebp - 0x88c]
push 0x40804c
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push ebx
push 0x4000080
push 2
push ebx
mov esi, 0xc0000000
push ebx
lea eax, [ebp - 0x27c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 4], eax
je 0x4039ff
lea eax, [ebp - 0x27c]
push eax
lea eax, [ebp - 0x174]
push eax
call fcn.00404140
lea eax, [ebp - 0x174]
push 0x2e
push eax
call fcn.00404230
mov byte [eax], bl
lea eax, [ebp - 0x174]
push str..exe
push eax
call fcn.00404150
add esp, 0x18
lea eax, [ebp - 0x174]
push ebx
push 0x80
push 2
push ebx
push 1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 4], eax
jne 0x403a1a
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403b25
mov eax, dword [ebp - 0x44]
push eax
mov dword [ebp - 0x18], eax
call fcn.00403d88
pop ecx
mov esi, eax
push ebx
push ebx
push dword [ebp - 0x4c]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 0x18]
push esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x48]
je 0x403ac4
push 4
call fcn.00403d88
cmp eax, ebx
pop ecx
je 0x403a69
mov ecx, eax
call fcn.00401733
mov dword [ebp - 4], eax
jmp 0x403a6c
mov dword [ebp - 4], ebx
mov ecx, dword [ebp - 4]
call fcn.00401747
push dword [ebp - 0x48]
call fcn.00403d88
pop ecx
mov dword [ebp - 0x1c], eax
push eax
mov ecx, dword [ebp - 4]
push dword [ebp - 0x48]
push esi
push dword [ebp - 0x18]
call fcn.00401702
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], eax
cmp ecx, ebx
je 0x403aa8
call fcn.00401739
push dword [ebp - 4]
call fcn.00403d7d
pop ecx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x48]
jne 0x403b3d
push esi
call fcn.00403d7d
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x1c]
pop ecx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 0x18]
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403ae2
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0xc], eax
je 0x403ae9
mov dword [ebp - 0x20], 1
push esi
call fcn.00403d7d
cmp dword [ebp - 0x20], 1
pop ecx
jne 0x403baa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], eax
call esi
push dword [ebp - 0x14]
call esi
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 4], 0x27
je 0x403b7b
cmp dword [ebp - 4], 0x70
je 0x403b7b
lea eax, [ebp - 0x67c]
push edi
push eax
push 5
jmp 0x403b85
push dword [ebp - 0x1c]
call fcn.00403d7d
push esi
call fcn.00403d7d
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
pop ecx
push dword [ebp - 8]
call esi
push dword [ebp - 0x14]
call esi
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x67c]
push edi
push eax
push 1
jmp 0x403b85
lea eax, [ebp - 0x67c]
push edi
push eax
push 3
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0xc8c]
push 0x30
push eax
lea eax, [ebp - 0x67c]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x403c3c
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x784]
push eax
mov eax, dword [ebp - 0x44]
push dword [ebp - 0x40]
add ecx, eax
lea eax, [ebp - 0x108c]
push ecx
push str.__S__ld__d___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x14
push dword [ebp - 0x14]
call esi
lea eax, [ebp - 0x108c]
push ebx
push eax
lea eax, [ebp - 0x174]
push eax
push dword [ebp + 8]
call fcn.00403701
add esp, 0x10
test eax, eax
jne 0x403c25
lea eax, [ebp - 0x67c]
push edi
push eax
push 5
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0xc8c]
push 0x30
push eax
lea eax, [ebp - 0x67c]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 8]
call esi
lea eax, [ebp - 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x10]
call esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10