Function at 0x10022cc2
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, 0x100783d8
call fcn.1005ac4f
mov esi, str.TxdlService.exe
push esi
mov edi, ecx
call fcn.10053c3b
pop ecx
lea edx, [edi + 0x4c]
mov ecx, esi
mov esi, edx
call fcn.1000238b
mov esi, 0x10085c4c
push esi
call fcn.10053c3b
pop ecx
lea ebx, [edi + 0x84]
mov ecx, esi
mov esi, ebx
call fcn.1000238b
lea ecx, [ebp - 0x1c]
call fcn.10009127
xor esi, esi
mov dword [ebp - 4], esi
push dword [eax]
lea eax, [ebp]
call fcn.1000188f
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003475
mov eax, dword [edi + 0x40]
cmp eax, esi
je 0x10022e87
mov dword [ebp - 0x10], esi
push 0x1007e340
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.10024226
test al, al
je 0x10022d81
push dword [ebp - 0x10]
lea esi, [edi + 0x4c]
call fcn.1000922d
xor esi, esi
mov dword [ebp - 0x18], esi
push 0x1007e340
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.10024226
test al, al
je 0x10022db8
push dword [ebp - 0x18]
mov esi, ebx
call fcn.1000922d
xor esi, esi
mov dword [ebp - 0x14], esi
push 0x1007e340
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.10024226
test al, al
je 0x10022e6c
mov eax, dword [0x1009d194]
mov ecx, 0x1009d194
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.100541d0
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 0x10022e4f
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 0x10022e61
lea eax, [ebp + 0x1c]
push eax
call fcn.10053c3b
pop ecx
lea ecx, [ebp + 0x1c]
lea esi, [ebp]
call fcn.1000238b
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.10003475
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 0x1007df90
lea eax, [ebp]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.100092ba
add esp, 0xc
lea ecx, [edi + 0x68]
push 0xffffffffffffffff
push ecx
xor ebx, ebx
mov byte [ebp - 4], 7
call fcn.10001d41
push esi
push 1
lea esi, [ebp - 0x3c]
mov byte [ebp - 4], 2
call fcn.10001ef7
push 0xffffffffffffffff
push ebx
lea eax, [edi + 0x4c]
lea esi, [edi + 0x68]
call fcn.100022e6
cmp dword [edi + 0x60], ebx
je 0x10022ee1
cmp dword [edi + 0x98], ebx
je 0x10022ee1
cmp dword [edi + 0x7c], ebx
je 0x10022ee1
xor edi, edi
inc edi
jmp 0x10022ee3
xor edi, edi
push ebx
push 1
lea esi, [ebp]
call fcn.10001ef7
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.10053c51
add ebp, 0x434
leave
ret