Function at 0x100240a4
Capabilities:
Check if file exists
Create directory
Query environment variable

Disassembly:
push ebp
sub esp, 0x430
lea ebp, [esp - 4]
mov eax, dword [0x10098428]
xor eax, ebp
mov dword [ebp + 0x430], eax
push 0x30
mov eax, 0x10077ab8
call fcn.1005a2eb
mov esi, str.TxdlService.exe
push esi
mov edi, ecx
call fcn.1005317b
pop ecx
lea edx, [edi + 0x48]
mov ecx, esi
mov esi, edx
call fcn.100022ac
mov esi, 0x10085c90
push esi
call fcn.1005317b
pop ecx
lea ebx, [edi + 0x80]
mov ecx, esi
mov esi, ebx
call fcn.100022ac
lea ecx, [ebp - 0x1c]
call fcn.1000915c
xor esi, esi
mov dword [ebp - 4], esi
push dword [eax]
lea eax, [ebp]
call fcn.1000189d
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003389
mov eax, dword [edi + 0x40]
cmp eax, esi
je 0x10024269
mov dword [ebp - 0x10], esi
push 0x1007e388
lea edx, [ebp - 0x10]
push edx
push str.ServiceExeName
mov byte [ebp - 4], 3
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
lea eax, [ebp - 0x10]
push eax
call fcn.10021059
test al, al
je 0x10024163
push dword [ebp - 0x10]
lea esi, [edi + 0x48]
call fcn.1000927b
xor esi, esi
mov dword [ebp - 0x18], esi
push 0x1007e388
lea edx, [ebp - 0x18]
push edx
mov byte [ebp - 4], 4
mov eax, dword [edi + 0x40]
mov ecx, dword [eax]
push str.ServiceInstallName
push eax
call dword [ecx + 0x14]
lea eax, [ebp - 0x18]
push eax
call fcn.10021059
test al, al
je 0x1002419a
push dword [ebp - 0x18]
mov esi, ebx
call fcn.1000927b
xor esi, esi
mov dword [ebp - 0x14], esi
push 0x1007e388
lea edx, [ebp - 0x14]
push edx
mov byte [ebp - 4], 5
mov eax, dword [edi + 0x40]
mov ecx, dword [eax]
push str.ServiceExeDir
push eax
call dword [ecx + 0x14]
lea eax, [ebp - 0x14]
push eax
call fcn.10021059
test al, al
je 0x1002424e
mov eax, dword [0x1009d334]
mov ecx, 0x1009d334
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
push 0x410
lea eax, [ebp + 0x1e]
push esi
mov byte [ebp - 4], 6
push eax
mov word [ebp + 0x1c], si
call fcn.10053710
add esp, 0xc
push 0x208
lea eax, [ebp + 0x1c]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp + 0x1c]
push eax
call ebx
test eax, eax
lea eax, [ebp + 0x1c]
jne 0x10024231
push esi
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea eax, [ebp + 0x1c]
push eax
call ebx
test eax, eax
je 0x10024243
lea eax, [ebp + 0x1c]
push eax
call fcn.1005317b
pop ecx
lea ecx, [ebp + 0x1c]
lea esi, [ebp]
call fcn.100022ac
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.10003389
push dword [ebp - 0x14]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
push dword [ebp - 0x18]
call esi
mov byte [ebp - 4], 2
push dword [ebp - 0x10]
call esi
xor esi, esi
push 0x1007dfc8
lea eax, [ebp]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.10009308
add esp, 0xc
lea ecx, [edi + 0x64]
push 0xffffffffffffffff
push ecx
xor ebx, ebx
mov byte [ebp - 4], 7
call fcn.10001d45
push esi
push 1
lea esi, [ebp - 0x3c]
mov byte [ebp - 4], 2
call fcn.10001efb
push 0xffffffffffffffff
push ebx
lea eax, [edi + 0x48]
lea esi, [edi + 0x64]
call fcn.10002207
cmp dword [edi + 0x5c], ebx
je 0x100242c3
cmp dword [edi + 0x94], ebx
je 0x100242c3
cmp dword [edi + 0x78], ebx
je 0x100242c3
xor edi, edi
inc edi
jmp 0x100242c5
xor edi, edi
push ebx
push 1
lea esi, [ebp]
call fcn.10001efb
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x430]
xor ecx, ebp
call fcn.10053191
add ebp, 0x434
leave
ret