Function at 0x401180
Capabilities:
Copy file
Delete file
Extract resource via kernel32 functions
Get common file path
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x620
mov ecx, 0x41
xor eax, eax
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x220]
push 0x104
rep stosd dword es:[edi], eax
lea eax, [esp + 0x224]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x406170
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, eax
test esi, esi
je 0x4011fe
mov ebx, dword [sym.imp.USER32.dll_MessageBoxA]
push 0x34
push 0x406168
push 0x406104
push 0
call ebx
cmp eax, 6
jne 0x4015e7
push 0
push 4
push 0x8a8
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401204
mov ebx, dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x63c]
push str.StartSetup
push ecx
call fcn.00401630
add esp, 8
test eax, eax
jne 0x4014f4
lea edx, [esp + 0x52c]
push 0x104
push edx
call fcn.004010f0
add esp, 8
test eax, eax
je 0x401315
lea edi, [esp + 0x52c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x401315
push 0x34
push 0x406168
push 0x4060d0
push eax
call ebx
cmp eax, 6
je 0x401315
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x324]
lea edx, [esp + 0x324]
rep stosd dword es:[edi], eax
mov edi, str._Bridge_
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x324]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x220]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x324]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x530]
push ecx
call fcn.00401000
add esp, 8
test eax, eax
je 0x401305
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x620
ret 0x10
push 0x30
push 0x406168
push 0x4060b8
push 0
call ebx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x11c]
push edx
push 0x104
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
or ecx, 0xffffffff
lea edi, [esp + 0x18]
xor eax, eax
lea edx, [esp + 0x11c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.TelmateSetup.exe
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x120]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.BridgeSource.txt
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
and ecx, 3
lea eax, [esp + 0x1c]
rep movsb byte es:[edi], byte [esi]
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x18]
push ecx
call ebp
lea edx, [esp + 0x11c]
push 0x80
push edx
call ebx
lea eax, [esp + 0x11c]
push eax
call ebp
push 0
push 0
push 2
push 0
push 0
lea ecx, [esp + 0x130]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
je 0x401449
lea eax, [esp + 0x10]
push 0
push eax
lea edi, [esp + 0x228]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x22c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_CopyFileA]
xor esi, esi
lea edx, [esp + 0x18]
push 0x80
push edx
call ebx
lea eax, [esp + 0x18]
push eax
call ebp
lea ecx, [esp + 0x18]
push 1
lea edx, [esp + 0x224]
push ecx
push edx
call edi
test eax, eax
jne 0x4014ac
push eax
lea eax, [esp + 0x1c]
push 0x406080
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 2
jl 0x401451
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x620
ret 0x10
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x324]
lea edx, [esp + 0x324]
rep stosd dword es:[edi], eax
mov edi, str.StartSetup
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x324]
push ecx
jmp 0x40160c
push str.Setup
push 0x6e
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, 0x41
lea edi, [esp + 0x18]
mov dword [esp + 0x10], eax
xor eax, eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, str.TmSimSetup.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0
push 2
push 0
push 0
lea edx, [esp + 0x2c]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4015b8
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x620
ret 0x10
lea eax, [esp + 0x14]
push 0
push eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
mov ecx, dword [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push esi
jne 0x4015f6
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x620
ret 0x10
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
push str.TelmateSetup
lea edx, [esp + 0x1c]
push edx
call fcn.00401000
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret 0x10