Function at 0x401020
Capabilities:
Delete file
Get common file path
Hide graphical window
Read file on windows
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push section..Shared
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
test eax, eax
je 0x40106c
push 0
mov eax, dword [section..rdata]
push eax
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, eax
push 6
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push 3
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
jmp 0x401378
push 0x7f02
xor esi, esi
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 0x200
lea eax, [ebp - 0x214]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
mov eax, 0x80000000
push eax
lea ecx, [ebp - 0x214]
push 3
push esi
push 3
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push esi
push esi
push 0x3f0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x10]
push 0xc
push ecx
push edi
mov ebx, 0x3000
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, 0x4031d0
call fcn.00401719
push 4
mov eax, dword [ebp - 0xc]
push ebx
inc eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
mov dword [ebp - 0x14], eax
push ebx
mov dword [0x40321e], eax
mov eax, dword [ebp - 8]
add eax, 5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push esi
mov dword [0x403222], eax
push esi
push dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea ecx, [ebp - 4]
push ecx
push dword [ebp - 0xc]
push dword [0x40321e]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40132d
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 4], eax
jne 0x40132d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x40101f
mov dword [0x403238], eax
mov dword [0x403234], eax
mov eax, dword [0x403222]
mov ecx, 0x4031d0
add eax, dword [ebp - 8]
add eax, 4
mov dword [0x40322c], eax
mov eax, dword [0x40321e]
add eax, dword [ebp - 0xc]
mov esi, 0xff
mov dword [0x403230], eax
call fcn.0040183b
lea ecx, [ebp - 0x214]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [ebp - 0x214]
call fcn.00401000
lea ecx, [ebp - 0x414]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [ebp - 0x414]
call fcn.00401000
push 0xffffffffffffffff
lea eax, [ebp - 0x214]
push eax
lea ecx, [ebp - 0x414]
push 0xffffffffffffffff
push ecx
push 1
push 0x400
call dword [sym.imp.KERNEL32.dll_CompareStringA]
cmp eax, 2
jne 0x4011eb
push 0x403068
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor esi, esi
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x214]
call fcn.00401000
push esi
lea eax, [ebp - 0x214]
push 0x80000000
push 2
push esi
push esi
push 0xc0000000
push str.ginstall.dll
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, eax
jne 0x40125b
cmp dword [ebp - 4], esi
jne 0x40124a
push 0xff
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov dword [ebp - 4], 1
jmp 0x4011f0
lea eax, [ebp - 0x214]
push eax
push str.Dont_create__s
jmp 0x401339
xor esi, esi
lea eax, [ebp - 4]
push esi
push eax
push dword [ebp - 8]
push dword [0x403222]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0x8000
push edi
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
mov eax, dword [0x403222]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, 0x4031d0
call fcn.00401807
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push str.MainPattern
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
jne 0x4012d6
push str.Dont_load_installer_function
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x401349
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov dword [0x403250], 0x401719
mov dword [0x403258], 0x401807
mov dword [0x403254], 0x40183b
push 0x403250
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea eax, [ebp - 0x214]
push eax
push str.Dont_read__s
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 0x10
lea eax, [ebp - 0x414]
push str.Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret