Function at 0x40174f
Capabilities:
Create directory
Delete directory
Delete file
Get common file path
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
mov eax, dword [0x40681c]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add eax, 0x14
push edi
push eax
call esi
mov eax, dword [0x40681c]
xor ebx, ebx
add eax, 0x14
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 0x324]
push eax
mov eax, dword [0x40681c]
push ebx
add eax, 0x14
push 0x405480
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [ebp - 0x324]
push eax
call esi
mov ecx, dword [0x405032]
lea eax, [ebp - 0x324]
push eax
mov eax, dword [0x40681c]
push dword [eax + 4]
mov eax, dword [0x406808]
lea eax, [ecx + eax + 0x2c8]
push eax
call fcn.00401fa2
mov edi, eax
add esp, 0xc
cmp edi, ebx
je 0x40186b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x40183b
push ebx
lea ecx, [ebp - 4]
push ebx
push ecx
push 0x400
push eax
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [ebp - 4]
lea eax, [ebp - 0x810]
push dword [ebp - 0xc]
push edi
push str.Unable_to_decompress_data._nError_Text:___s__nWindows_Error_Code:__d____s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x810]
push 0x2010
push str.GkWare_Self_Extractor_Module_V2.00_zl
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40189f
push edi
lea eax, [ebp - 0x810]
push str.Unable_to_decompress_data._nError_Text:__s__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x810]
push 0x2010
push str.GkWare_Self_Extractor_Module_V2.00_zl
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40189f
push ebx
push ebx
push 3
push ebx
push 1
lea eax, [ebp - 0x324]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x4018be
push str.Unable_to_open_decompressed_data_file
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004011df
pop ecx
pop ecx
lea eax, [ebp - 0x324]
push eax
call esi
mov eax, dword [0x40681c]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor eax, eax
jmp 0x401b31
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 8]
push ebx
push ecx
lea ecx, [ebp - 0x11c]
push 0x10c
push ecx
push eax
jmp 0x401a16
cmp dword [ebp - 8], ebx
je 0x401a20
lea eax, [ebp - 0x11c]
push eax
mov eax, dword [0x40681c]
add eax, 0x14
push eax
lea eax, [ebp - 0x220]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x220]
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x401992
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x40681c]
mov eax, dword [eax + 0x2c4]
dec eax
je 0x401989
dec eax
je 0x401978
dec eax
jne 0x401992
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x428]
push str.The_file___s__already_exists._Overwrite_it__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x428]
push 0x24
push str.GkWare_Self_Extractor_Module_V2.00_zl
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
jne 0x401989
push 1
push ebx
push dword [ebp - 0x18]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x401992
lea eax, [ebp - 0x220]
push eax
call esi
push ebx
push ebx
push 2
push ebx
push 1
lea eax, [ebp - 0x220]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], eax
je 0x4019f9
mov eax, 0x104
cmp dword [ebp - 0x18], eax
jbe 0x4019c0
mov eax, dword [ebp - 0x18]
push eax
call fcn.00401000
cmp eax, ebx
pop ecx
mov dword [ebp - 0x10], eax
je 0x401a3c
lea ecx, [ebp - 8]
push ebx
push ecx
push dword [ebp - 0x18]
push eax
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push ebx
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x10]
call fcn.00401014
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x11c]
push 0x10c
push eax
push dword [ebp - 4]
call edi
test eax, eax
jne 0x4018db
mov eax, dword [0x40681c]
cmp byte [eax + 0x11c], bl
je 0x401a67
lea eax, [ebp - 0x220]
push eax
call fcn.00401603
pop ecx
jmp 0x401a7a
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x324]
push eax
call esi
mov eax, dword [0x40681c]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
call fcn.004011af
jmp 0x401b31
push ebx
push str.GkWare_Self_Extractor_Module_V2.00_zl
push dword [0x405014]
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x40681c]
cmp dword [eax + 0x2c0], ebx
je 0x401b0d
push ebx
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x401af3
cmp dword [ebp - 8], ebx
je 0x401b0d
push 1
push ebx
push dword [ebp - 0x18]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x11c]
push eax
mov eax, dword [0x40681c]
add eax, 0x14
push eax
lea eax, [ebp - 0x220]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x220]
push eax
call esi
test eax, eax
jne 0x401af3
push 0x9c4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x220]
push eax
call esi
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x11c]
push 0x10c
push eax
push dword [ebp - 4]
call edi
test eax, eax
jne 0x401a99
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x324]
push eax
call esi
mov eax, dword [0x40681c]
add eax, 0x14
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret