Function at 0x4010b9
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get file attributes
Get file size
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa5c
push ebx
lea eax, [ebp - 0x65c]
push esi
xor ebx, ebx
push edi
lea ecx, [ebp - 0xa5c]
push 0x200
mov dword [ebp - 0x10], ebx
push ecx
mov dword [ebp - 8], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp dword [0x40201c], ebx
je 0x401137
push ebx
lea eax, [ebp - 0xa5c]
push ebx
push 3
push ebx
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [0x40201c]
jae 0x401130
push str.The_file_is_corrupted._It_was_downloaded_with_errors_or_otherwise_damaged._nPlease_download_it_again_and_make_sure_that_you_do_not_have_viruses.
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40147c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, dword [section..rdata]
push 0x28
add edi, eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00401b96
mov eax, dword [0x402024]
mov ecx, dword [edi]
mov eax, dword [eax + edi]
cmp eax, ecx
ja 0x401162
mov eax, ecx
add eax, 0x400
push eax
call fcn.00401b6c
cmp dword [0x402024], 0
mov esi, eax
je 0x40130c
lea eax, [ebp - 0x25c]
push eax
push 0x200
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x25d], 0x5c
jne 0x4011ba
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov byte [ebp + eax - 0x25d], 0
lea ecx, [ebp - 0x25c]
lea edx, [ebp - 0x45c]
push dword [ebp - 0x10]
push ecx
push str._sgentee_02X.tmp
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x45c]
push 0
push 0
push 2
push 0
push 0
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
lea eax, [ebp - 0x45c]
push eax
jne 0x401258
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401239
test ebx, ebx
jne 0x401241
push str.c:_temp
lea eax, [ebp - 0x25c]
push eax
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
inc dword [ebp - 0x10]
jmp 0x4011ba
push str.Cannot_create_temporary_directory_
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40147c
lea ecx, [ebp - 0x65c]
xor ebx, ebx
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [ebp - 0x65c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
lea ecx, [ebp - 0x65c]
push ecx
mov byte [ebp + eax - 0x660], bl
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x5c]
push eax
lea eax, [edi + 4]
push dword [edi]
push esi
push eax
call fcn.004015a5
lea eax, [ebp - 0x65c]
lea ecx, [ebp - 0x85c]
push eax
push str._sgentee.dll
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x85c]
push ebx
push ebx
push 2
push ebx
push ebx
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x4012f5
push ebx
lea eax, [ebp - 0x34]
push eax
push dword [edi]
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4012f5
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40131e
push str.Internal_error_:_1__
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40147c
push str.gentee.dll
lea eax, [ebp - 0x85c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x85c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x401352
lea eax, [ebp - 0x85c]
lea ecx, [ebp - 0x25c]
push eax
push str.Cannot_load__s.
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x40147c
push str.ge_init
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ge_deinit
mov dword [ebp - 0x18], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ge_load
mov dword [ebp - 4], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ge_call
mov dword [ebp - 0x14], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
add edi, dword [0x402024]
push 0x28
mov dword [0x4034e0], eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00401b96
lea eax, [ebp - 0x5c]
push eax
push dword [edi]
push esi
add edi, 4
push edi
call fcn.004015a5
push 0x18
lea eax, [ebp - 0x30]
push eax
call fcn.00401b96
mov dword [ebp - 0x30], 0x18
cmp byte [0x402020], 1
mov eax, 0
lea ecx, [ebp - 0x10]
adc eax, 0xffffffff
and eax, 2
or al, 5
cmp dword [0x402024], 1
mov dword [ebp - 0x20], 0x401085
mov dword [ebp - 0x2c], eax
mov eax, 0
adc eax, 0xffffffff
and eax, ecx
lea ecx, [ebp - 0x30]
push ecx
mov dword [ebp - 0x1c], eax
call dword [ebp - 0x18]
cmp dword [esi], 0x4547
je 0x40141b
push str.Internal_error_:_2__
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40147c
push 0
push 0x27
push esi
call dword [ebp - 0x14]
mov edi, eax
call dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call fcn.00401b82
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x402024], 0
je 0x401475
lea eax, [ebp - 0x45c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x85c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x65c]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push edi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea eax, [ebp - 0xa5c]
lea ecx, [ebp - 0x45c]
push eax
push str.ERROR:
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x10
lea ecx, [ebp - 0x45c]
push ecx
lea edx, [ebp - 0x25c]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]