Function at 0x401681
Capabilities:
Delete file
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
push 0xa
push dword [ebp + 8]
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, esi
jne 0x4016a5
push esi
push str.Could_not_find_compressed_executable_resource.
jmp 0x4016e4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, esi
mov dword [ebp - 0xc], eax
jne 0x4016bc
push esi
push str.Could_not_get_size_of_resource_ncontaining_compressed_executable.
jmp 0x4016e4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, esi
jne 0x4016d0
push esi
push str.Could_not_load_resource_containing_compressed_executable.
jmp 0x4016e4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x4016f9
push esi
push str.Could_not_lock_resource_containing_compressed_executable.
push str.Internal_Error
call fcn.00401625
add esp, 0xc
or eax, 0xffffffff
jmp 0x4019ec
cmp byte [eax], 0x1f
push ebx
lea ebx, [eax + 1]
jne 0x4019d5
mov al, byte [ebx]
inc ebx
cmp al, 0x8b
jne 0x4019d5
mov al, byte [ebx]
inc ebx
cmp al, 8
je 0x401723
push esi
push str.Unsupported_compression_method.
jmp 0x4019db
mov al, byte [ebx]
add ebx, 7
test al, 4
je 0x40173a
movzx edi, byte [ebx]
inc ebx
xor ecx, ecx
mov ch, byte [ebx]
or ecx, edi
lea ebx, [ebx + ecx + 1]
test al, 8
je 0x401745
mov cl, byte [ebx]
inc ebx
test cl, cl
jne 0x40173e
test al, 0x10
je 0x401750
mov cl, byte [ebx]
inc ebx
test cl, cl
jne 0x401749
test al, 2
je 0x401756
inc ebx
inc ebx
mov edi, 0x4000
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
cmp eax, esi
pop ecx
mov dword [ebp - 8], eax
jne 0x40177a
push esi
push str.Could_not_allocate_memory_for_output_buffer.
push str.Out_of_Memory_Error
jmp 0x4019e0
push 0x38
push 1
call dword [sym.imp.MSVCRT.dll_calloc]
mov esi, eax
xor eax, eax
cmp esi, eax
pop ecx
pop ecx
jne 0x4017b0
push dword [ebp - 8]
call dword [sym.imp.MSVCRT.dll_free]
push 0
push str.Could_not_allocate_memory_for_zlib_stream_data.
push str.Out_of_Memory_Error
call fcn.00401625
add esp, 0x10
jmp 0x4019e8
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov eax, dword [ebp - 4]
push 0x38
sub eax, ebx
add eax, dword [ebp - 0xc]
push str.1.2.1
mov dword [esi], ebx
mov ebx, dword [ebp - 8]
push 0xfffffffffffffff1
push esi
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], edi
call fcn.00402b9f
xor ecx, ecx
add esp, 0x10
cmp eax, ecx
mov dword [ebp - 8], eax
je 0x40180e
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebx
call esi
cmp dword [ebp - 8], 0xfffffffc
pop ecx
pop ecx
push 0
push str.Could_not_initialize_zlib
jne 0x4019db
jmp 0x401770
push ecx
push 0x80
push 2
push ecx
push ecx
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40185e
push esi
call fcn.00403e34
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebx
call esi
add esp, 0xc
cmp dword [ebp + 0x10], 1
je 0x4019e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_create_temporary_file
jmp 0x4019ce
push 0
push esi
call fcn.00402d5f
pop ecx
pop ecx
xor ecx, ecx
mov dword [ebp - 8], eax
sub eax, ecx
jne 0x4018b0
cmp dword [esi + 0x10], ecx
jne 0x40185e
mov dword [ebp - 8], ecx
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
mov ecx, edi
sub ecx, eax
push ecx
add eax, ebx
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401995
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
cmp eax, edi
mov dword [ebp - 8], eax
jb 0x401879
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], edi
jmp 0x40185e
dec eax
jne 0x40191f
mov eax, dword [esi + 0x10]
cmp eax, edi
jae 0x4018fa
mov dword [ebp - 8], ecx
mov ecx, edi
sub ecx, eax
je 0x4018fa
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
mov ecx, edi
sub ecx, dword [esi + 0x10]
sub ecx, eax
push ecx
add eax, ebx
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401995
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov ecx, edi
sub ecx, dword [esi + 0x10]
mov dword [ebp - 8], eax
cmp eax, ecx
jb 0x4018c3
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00403e34
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebx
call esi
add esp, 0xc
xor eax, eax
jmp 0x4019eb
push esi
call fcn.00403e34
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebx
call esi
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 8]
cmp eax, 0xfffffffa
push 0
push str.Could_not_decompress_GoToAssist_executable.
je 0x40198e
cmp eax, 0xfffffffb
je 0x401987
cmp eax, 0xfffffffc
je 0x401770
cmp eax, 0xfffffffd
je 0x401980
cmp eax, 0xfffffffe
je 0x401979
cmp eax, 0xffffffff
jne 0x4019db
push str.File_I_O_Error
jmp 0x4019e0
push str.Stream_Error
jmp 0x4019e0
push str.Data_Error
jmp 0x4019e0
push str.Buffer_Error
jmp 0x4019e0
push str.Version_Error
jmp 0x4019e0
push esi
call fcn.00403e34
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push ebx
call esi
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 0x10], 1
je 0x4019e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_write_data_to_file.
push str.I_O_Error
jmp 0x4019e0
push esi
push str.Compressed_executable_not_in_GZIP_format.
push str.Internal_Error
call fcn.00401625
add esp, 0xc
or eax, 0xffffffff
pop ebx
pop edi
pop esi
leave
ret