Function at 0x40be30
Capabilities:
Check if file exists
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x45fcd0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x491104]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, edx
push str.install_start_klaestsconfig
lea ecx, [esp + 0x2c]
call fcn.00406e00
mov dword [esp + 0x48], 0
push str.install_start_klaestsconfig
lea ecx, [esp + 0x30]
call fcn.00406e00
mov byte [esp + 0x48], 1
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.004160f0
add esp, 8
mov byte [esp + 0x48], 2
lea edx, [esp + 0x28]
push edx
push eax
call fcn.00411260
mov byte [esp + 0x48], 1
lea ecx, [esp + 0x38]
call fcn.00406ed0
mov byte [esp + 0x48], 0
lea ecx, [esp + 0x2c]
call fcn.00406ed0
mov dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.00406ed0
lea eax, [esp + 0x38]
push eax
call fcn.00410440
add esp, 4
mov dword [esp + 0x48], 3
push str.KLAESPreRequisitesFirewall_
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x48], 5
lea ecx, [esp + 0x38]
call fcn.00406ed0
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x14]
call fcn.00406730
mov byte [esp + 0x48], 6
lea eax, [esp + 0x30]
push edi
push eax
lea esi, [esp + 0x18]
call fcn.0040bce0
push str.logs_
lea ecx, [esp + 0x28]
push ebx
push ecx
call fcn.00406150
add esp, 0x14
mov byte [esp + 0x48], 7
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40bf5d
push eax
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str.KlaesTsConfigU.exe
lea ecx, [esp + 0x18]
call fcn.00406e00
mov byte [esp + 0x48], 8
push ebx
lea ecx, [esp + 0x30]
push str._basedir:_
push ecx
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x48], 9
push str.___function:_unblock___log:_
push eax
lea edx, [esp + 0x3c]
push edx
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x48], 0xa
lea ecx, [esp + 0x1c]
push ecx
push eax
lea edx, [esp + 0x40]
push edx
call fcn.004060a0
add esp, 0xc
mov byte [esp + 0x48], 0xb
push str.KlaesTSConfig.log_
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00406150
add esp, 0xc
mov byte [esp + 0x48], 0xd
lea ecx, [esp + 0x38]
call fcn.00406ed0
mov byte [esp + 0x48], 0xe
lea ecx, [esp + 0x34]
call fcn.00406ed0
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x2c]
call fcn.00406ed0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x2c], 0
call fcn.004060a0
add esp, 0xc
mov byte [esp + 0x48], 0x10
push eax
lea ecx, [esp + 0x18]
call fcn.00406800
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x38]
call fcn.00406ed0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x3c]
push str.starting
push edx
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x48], 0x11
push eax
mov ecx, edi
call fcn.00411500
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x38]
call fcn.00406ed0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x3c]
push 0x4692fc
push ecx
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x48], 0x12
push eax
mov ecx, edi
call fcn.00411500
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x38]
call fcn.00406ed0
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x3c]
push str.workingdir:
push eax
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x48], 0x13
push eax
mov ecx, edi
call fcn.00411500
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x38]
call fcn.00406ed0
push 1
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x24]
call fcn.0040ceb0
mov bl, al
add esp, 0x10
test bl, bl
je 0x40c227
lea ecx, [esp + 0x24]
call fcn.00406fc0
mov byte [esp + 0x48], 0x14
mov ecx, dword [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push 0x4698c8
push edx
call fcn.004066b0
add esp, 0xc
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x3c]
push str.exitcode:
push ecx
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x48], 0x15
push eax
mov ecx, edi
call fcn.00411500
mov byte [esp + 0x48], 0x14
lea ecx, [esp + 0x38]
call fcn.00406ed0
cmp dword [esp + 0x20], 1
lea ecx, [esp + 0x28]
jne 0x40c1aa
push str.install_success_nofirewall_klaestsconfig
call fcn.00406e00
mov byte [esp + 0x48], 0x16
push str.install_success_nofirewall_klaestsconfig
lea ecx, [esp + 0x30]
call fcn.00406e00
mov byte [esp + 0x48], 0x17
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004160f0
add esp, 8
mov byte [esp + 0x48], 0x18
lea ecx, [esp + 0x28]
push ecx
push eax
push edi
call fcn.004113c0
mov byte [esp + 0x48], 0x17
lea ecx, [esp + 0x38]
call fcn.00406ed0
mov byte [esp + 0x48], 0x16
jmp 0x40c202
push str.install_success_klaestsconfig
call fcn.00406e00
mov byte [esp + 0x48], 0x19
push str.install_success_klaestsconfig
lea ecx, [esp + 0x30]
call fcn.00406e00
mov byte [esp + 0x48], 0x1a
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.004160f0
add esp, 8
mov byte [esp + 0x48], 0x1b
lea ecx, [esp + 0x28]
push ecx
push eax
push edi
call fcn.004113c0
mov byte [esp + 0x48], 0x1a
lea ecx, [esp + 0x38]
call fcn.00406ed0
mov byte [esp + 0x48], 0x19
lea ecx, [esp + 0x2c]
call fcn.00406ed0
mov byte [esp + 0x48], 0x14
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x24]
jmp 0x40c3f1
call fcn.0042f665
test eax, eax
je 0x40c23b
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
jmp 0x40c23d
xor eax, eax
push 5
mov ecx, eax
call fcn.004302c1
call fcn.0042f665
test eax, eax
je 0x40c25a
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
jmp 0x40c25c
xor eax, eax
mov ecx, dword [eax + 0x20]
push ecx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x2c]
mov esi, eax
call fcn.00406fc0
mov byte [esp + 0x48], 0x1c
lea ecx, [esp + 0x28]
call fcn.00406fc0
mov byte [esp + 0x48], 0x1d
lea ecx, [esp + 0x24]
call fcn.00406fc0
mov byte [esp + 0x48], 0x1e
push esi
lea edx, [esp + 0x28]
push 0x4698c8
push edx
call fcn.004066b0
add esp, 0xc
push esi
lea eax, [esp + 0x30]
push str.KlaesTsConfigU.exe_failed_to_start._windows_reports_error_:__d
push eax
call fcn.004066b0
add esp, 0xc
push str.KlaesTsConfigU
lea ecx, [esp + 0x3c]
call fcn.00406e00
mov byte [esp + 0x48], 0x1f
push str.setup_launch_failure
lea ecx, [esp + 0x38]
call fcn.00406e00
mov byte [esp + 0x48], 0x20
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x54]
push ecx
call fcn.004161d0
add esp, 0x1c
mov byte [esp + 0x48], 0x21
push eax
lea ecx, [esp + 0x2c]
call fcn.00406800
mov byte [esp + 0x48], 0x20
lea ecx, [esp + 0x3c]
call fcn.00406ed0
mov byte [esp + 0x48], 0x1f
lea ecx, [esp + 0x34]
call fcn.00406ed0
mov byte [esp + 0x48], 0x1e
lea ecx, [esp + 0x38]
call fcn.00406ed0
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, edi
call fcn.00411190
push str.install_error_klaestsconfig
lea ecx, [esp + 0x38]
call fcn.00406e00
mov byte [esp + 0x48], 0x22
push str.install_error_klaestsconfig
lea ecx, [esp + 0x3c]
call fcn.00406e00
mov byte [esp + 0x48], 0x23
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.004160f0
add esp, 8
mov byte [esp + 0x48], 0x24
lea ecx, [esp + 0x34]
push ecx
push eax
push edi
call fcn.004113c0
mov byte [esp + 0x48], 0x23
lea ecx, [esp + 0x3c]
call fcn.00406ed0
mov byte [esp + 0x48], 0x22
lea ecx, [esp + 0x38]
call fcn.00406ed0
mov byte [esp + 0x48], 0x1e
lea ecx, [esp + 0x34]
call fcn.00406ed0
mov byte [esp + 0x48], 0x1d
lea ecx, [esp + 0x24]
call fcn.00406ed0
mov byte [esp + 0x48], 0x1c
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x2c]
call fcn.00406ed0
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x10]
push edx
call fcn.0040b740
add esp, 4
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x40]
push str.Delete
push ecx
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x48], 0x25
push eax
mov ecx, edi
call fcn.00411500
mov byte [esp + 0x48], 0xf
lea ecx, [esp + 0x3c]
call fcn.00406ed0
and bl, 1
mov byte [esp + 0x48], 8
lea ecx, [esp + 0x18]
call fcn.00406ed0
mov byte [esp + 0x48], 7
lea ecx, [esp + 0x14]
call fcn.00406ed0
mov byte [esp + 0x48], 6
lea ecx, [esp + 0x1c]
call fcn.00406ed0
mov byte [esp + 0x48], 5
lea ecx, [esp + 0x10]
call fcn.00406ed0
mov dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.00406ed0
mov al, bl
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x3c
ret