Function at 0x40c58c
Capabilities:
Check if file exists
Copy file
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x724
push 0
call fcn.0040328c
pop ecx
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x51c]
push 0
push eax
call fcn.004025e2
pop ecx
test eax, eax
pop ecx
je 0x40c8a8
lea eax, [ebp - 0x724]
push 1
push eax
call fcn.0040276b
pop ecx
test eax, eax
pop ecx
je 0x40c8a8
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push esi
push edi
lea eax, [ebp - 0x51c]
push str.wt.ini
push eax
mov edi, str._s_s
lea eax, [ebp - 0x314]
push edi
push eax
call ebx
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x620]
push 0x41f110
push eax
call ebx
add esp, 0x1c
lea eax, [ebp - 8]
mov esi, str.wcmdmgr.exe
lea ecx, [ebp - 0x210]
push eax
push esi
call fcn.0040340a
test eax, eax
jne 0x40c653
lea eax, [ebp - 8]
lea ecx, [ebp - 0x620]
push eax
push esi
call fcn.0040340a
test eax, eax
je 0x40c653
push dword [ebp - 8]
lea ecx, [ebp - 0x210]
push esi
call fcn.0040348e
lea eax, [ebp - 4]
lea ecx, [ebp - 0x210]
push eax
push esi
call fcn.004033a3
test eax, eax
jne 0x40c68a
lea eax, [ebp - 4]
lea ecx, [ebp - 0x620]
push eax
push esi
call fcn.004033a3
test eax, eax
je 0x40c68a
push dword [ebp - 4]
lea ecx, [ebp - 0x210]
push esi
call fcn.00403437
lea eax, [ebp - 4]
lea ecx, [ebp - 0x210]
push eax
push esi
call fcn.004034e3
test eax, eax
jne 0x40c6c1
lea eax, [ebp - 4]
lea ecx, [ebp - 0x620]
push eax
push esi
call fcn.004034e3
test eax, eax
je 0x40c6c1
push dword [ebp - 4]
lea ecx, [ebp - 0x210]
push esi
call fcn.00403582
lea eax, [ebp - 0x51c]
push str.wtlog.txt
push eax
lea eax, [ebp - 0x314]
push edi
push eax
call ebx
lea eax, [ebp - 0x724]
push str.wtlog.txt
push eax
lea eax, [ebp - 0x10c]
push edi
push eax
call ebx
add esp, 0x20
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40c718
lea eax, [ebp - 0x10c]
push 1
push eax
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x51c]
push str.info.txt
push eax
lea eax, [ebp - 0x314]
push edi
push eax
call ebx
add esp, 0x10
lea eax, [ebp - 0x10c]
lea ecx, [ebp - 0x210]
push eax
push esi
call fcn.00403341
lea eax, [ebp - 0x10c]
push 1
push eax
call fcn.00402868
pop ecx
lea eax, [ebp - 0x10c]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40c77c
lea eax, [ebp - 0x10c]
push 1
push eax
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0x418]
lea ecx, [ebp - 0x210]
push eax
push esi
call fcn.004033ce
test eax, eax
mov edi, str.guid
jne 0x40c7dd
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x418]
push 0x104
push eax
push 0x41f7e4
push edi
push str.info.txt
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
mov dword [ebp - 4], eax
jbe 0x40c7dd
cmp eax, 0x103
jae 0x40c7dd
lea eax, [ebp - 0x418]
lea ecx, [ebp - 0x210]
push eax
push esi
call fcn.0040346c
lea eax, [ebp - 0x10c]
mov esi, str.appinfo.dat
push eax
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea eax, [ebp - 0x10c]
mov edi, str.wtavinf
push eax
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push esi
push str.WTWebDriver
lea eax, [ebp - 0x51c]
push str.wtupdates
push eax
lea eax, [ebp - 0x10c]
push str._s_s_s_s
push eax
call ebx
lea eax, [ebp - 0x10c]
push 1
push eax
call fcn.00402868
add esp, 0x20
lea eax, [ebp - 0x10c]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push eax
lea eax, [ebp - 0x418]
push 0x104
push eax
push 0x41f7e4
push edi
push esi
call ebx
test eax, eax
mov dword [ebp - 4], eax
jne 0x40c8a0
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x418]
push 0x104
push eax
push 0x41f7e4
push edi
push str.info.txt
call ebx
test eax, eax
mov dword [ebp - 4], eax
jbe 0x40c8a0
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x418]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
xor eax, eax
pop edi
pop esi
inc eax
pop ebx
leave
ret
xor eax, eax
leave
ret