Function at 0x100230db
Capabilities:
Check if file exists
Create directory
Delete file
Move file
Query environment variable

Disassembly:
push ebp
sub esp, 0x530
lea ebp, [esp - 4]
mov eax, dword [0x10098428]
xor eax, ebp
mov dword [ebp + 0x530], eax
push 0x18
mov eax, 0x10078348
call fcn.1005ac4f
mov eax, dword [0x1009d194]
mov edi, 0x1009d194
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
mov byte [ebp - 4], 1
mov eax, dword [ebx + 0x40]
cmp eax, esi
je 0x10023268
mov ecx, dword [eax]
push 0x1007e340
lea edx, [ebp - 0x20]
push edx
push str.ServiceExeName
push eax
call dword [ecx + 0x14]
and dword [ebp - 0x10], esi
push 0x1007e340
lea edx, [ebp - 0x10]
push edx
mov byte [ebp - 4], 2
mov eax, dword [ebx + 0x40]
mov ecx, dword [eax]
push str.ServiceExeDir
push eax
call dword [ecx + 0x14]
lea eax, [ebp - 0x10]
push eax
call fcn.10024226
test al, al
je 0x10023255
lea eax, [ebp - 0x20]
push eax
call fcn.10024226
test al, al
je 0x10023255
mov eax, dword [0x1009d194]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
xor edi, edi
push 0x410
lea eax, [ebp + 0x1e]
push edi
mov byte [ebp - 4], 3
push eax
mov word [ebp + 0x1c], di
call fcn.100541d0
add esp, 0xc
push 0x208
lea eax, [ebp + 0x1c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100231da
push edi
lea eax, [ebp + 0x1c]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea eax, [ebp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10023248
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.10002e48
lea eax, [ebp - 0x18]
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.10002e8f
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.10003475
push dword [ebp - 0x20]
mov eax, edi
call fcn.10023c76
push dword [ebp - 0x20]
lea eax, [ebx + 0x48]
push eax
call fcn.100030a8
lea edi, [ebx + 0x4c]
lea eax, [ebp - 0x14]
call fcn.10002e8f
lea eax, [ebp - 0x14]
call fcn.100164d1
mov dword [ebp - 0x18], 1
mov esi, dword [ebp - 0x18]
xor edi, edi
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003475
jmp 0x10023257
xor edi, edi
mov byte [ebp - 4], 1
push dword [ebp - 0x10]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp esi, edi
jne 0x100232d7
lea ecx, [ebp - 0x24]
call fcn.10009127
mov byte [ebp - 4], 5
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
call fcn.10002e48
lea eax, [ebp - 0x1c]
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.10002e8f
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.10003475
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.10003475
mov esi, str.TxdlCom.exe
push esi
mov eax, edi
call fcn.10023c76
lea edi, [ebx + 0x4c]
lea eax, [ebp - 0x14]
call fcn.10002e8f
lea eax, [ebx + 0x48]
push esi
push eax
call fcn.100030a8
lea eax, [ebp - 0x14]
call fcn.100164d1
mov esi, dword [ebp - 0x18]
xor edi, edi
mov ecx, dword [ebx + 0x4c]
push 0x70
call fcn.10021a7b
test eax, eax
pop ecx
jne 0x10023329
neg esi
sbb esi, esi
add esi, 0x6b
mov dword [ebx + 0x44], esi
push dword [ebp - 0x20]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.10003475
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 + 0x530]
xor ecx, ebp
call fcn.10053c51
add ebp, 0x534
leave
ret
mov eax, dword [ebx + 0x40]
mov ecx, dword [eax]
push edi
push str.ComExeToMgrPath
push eax
call dword [ecx + 0x20]
test eax, eax
je 0x100233c7
lea esi, [ebp]
call fcn.1001627c
mov byte [ebp - 4], 7
cmp dword [ebp + 0x14], 0
je 0x100233b9
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x1002335e
lea eax, [ebp + 4]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.10002e48
mov byte [ebp - 4], 8
push dword [ebp - 0x20]
lea eax, [ebp - 0x10]
call fcn.10023c76
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x10]
lea esi, [ebx + 0x4c]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x100233ae
push dword [ebp - 0x10]
push esi
call fcn.100030a8
lea eax, [ebp - 0x10]
lea edi, [ebp - 0x14]
call fcn.10002e8f
mov eax, edi
call fcn.100164d1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.10003475
push 0
push 1
lea esi, [ebp]
call fcn.10001ef7
xor edi, edi
push dword [ebx + 0x4c]
call fcn.1002303e
push 0xfe
lea eax, [ebp + 0x432]
push edi
push eax
mov word [ebp + 0x430], di
call fcn.100541d0
add esp, 0x10
push 0x80
lea eax, [ebp + 0x430]
push eax
push 0x10084218
call dword [sym.imp.ole32.dll_StringFromGUID2]
lea eax, [ebp - 0x1c]
push eax
push 0x2001f
push edi
push 0x1007dda4
push SysReAllocString
xor esi, esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x1c], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x10023497
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp + 0x430]
push ecx
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0x10]
call fcn.10008d15
test eax, eax
jne 0x1002348e
push str.LocalServer32
push dword [ebp - 0x10]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], edi
call fcn.10008d15
mov esi, eax
cmp esi, edi
jne 0x1002346a
push dword [ebp - 0x14]
lea eax, [ebp - 0x18]
push edi
push eax
call fcn.10013350
mov esi, eax
cmp dword [ebp - 0x18], edi
je 0x10023478
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp esi, edi
sete al
mov esi, eax
cmp esi, edi
jne 0x1002349e
mov dword [ebx + 0x44], 0x6e
jmp 0x1002349e
mov dword [ebx + 0x44], 0x6d
jmp 0x1002349e
mov dword [ebx + 0x44], 0x6c
cmp dword [ebp - 0x10], edi
je 0x100234ac
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, esi
jmp 0x100232f0