Function at 0x100019a0
Capabilities:
Check if file exists
Get file attributes
Query environment variable
Query or enumerate registry value
Read file on windows
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xa6e0
call fcn.10007480
mov eax, dword [0x1002e074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0xa6d4], eax
mov eax, dword [ebp + 0x10]
push 0x208
mov dword [ebp - 0xa6dc], eax
lea eax, [ebp - 0x464]
push 0
push eax
movups xmmword [ebp - 0x54], xmm0
movups xmmword [ebp - 0x44], xmm0
movq qword [ebp - 0x34], xmm0
call fcn.10008540
push 0x208
lea eax, [ebp - 0x66c]
push 0
push eax
call fcn.10008540
push 0x4000
lea eax, [ebp - 0xa66c]
push 0
push eax
call fcn.10008540
push 0x4000
lea eax, [ebp - 0x666c]
push 0
push eax
call fcn.10008540
push 0x208
lea eax, [ebp - 0x25c]
push 0
push eax
call fcn.10008540
add esp, 0x3c
lea eax, [ebp - 0x54]
push 0x104
push eax
push 0x3ed
push esi
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x2000
lea eax, [ebp - 0xa66c]
push eax
push 0x10024464
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xa6c4]
push eax
push 1
push 0
push 0x10024500
push 0x80000002
mov dword [ebp - 0xa6cc], 0x104
mov dword [ebp - 0xa6c8], 1
mov dword [ebp - 0xa6c4], 0
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x10001ae9
mov eax, dword [ebp - 0xa6c4]
test eax, eax
je 0x10001ae9
lea ecx, [ebp - 0xa6cc]
push ecx
lea ecx, [ebp - 0x66c]
push ecx
lea ecx, [ebp - 0xa6c8]
push ecx
push 0
push str.Location
push eax
call ebx
push dword [ebp - 0xa6c4]
call esi
lea eax, [ebp - 0xa6c4]
mov dword [ebp - 0xa6cc], 0x104
push eax
push 1
push 0
push str.SoftwareSybasePowerBuilder22.0
push 0x80000002
mov dword [ebp - 0xa6c8], 1
mov dword [ebp - 0xa6c4], 0
call edi
test eax, eax
jne 0x10001b53
mov eax, dword [ebp - 0xa6c4]
test eax, eax
je 0x10001b53
lea ecx, [ebp - 0xa6cc]
push ecx
lea ecx, [ebp - 0x25c]
push ecx
lea ecx, [ebp - 0xa6c8]
push ecx
push 0
push str.IPS_Name
push eax
call ebx
push dword [ebp - 0xa6c4]
call esi
lea ecx, [ebp - 0x25c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10001b60
sub ecx, edx
sar ecx, 1
je 0x10001c0a
lea ecx, [ebp - 0x66c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10001b80
sub ecx, edx
sar ecx, 1
je 0x10001c0a
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x666c]
push str._s_sIDE_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0xa66c]
add esp, 0x10
mov esi, edx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10001bc0
lea edi, [ebp - 0x666c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10001bd6
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x666c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0xa66e], ax
test ax, ax
jne 0x10001bf2
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x66c]
push 0x104
push eax
push 0
call ebx
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x66c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x25e], ax
test ax, ax
jne 0x10001c22
lea eax, [ebp - 0x25c]
push 0x5c
push eax
call fcn.10008229
add esp, 8
test eax, eax
je 0x10001c54
xor ecx, ecx
mov word [eax], cx
lea edi, [ebp - 0x25c]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10001c60
mov eax, dword [0x100245d4]
mov edx, dword [ebp - 0xa6d4]
mov esi, edx
mov dword [edi], eax
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10001c80
lea edi, [ebp - 0x25c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10001c96
mov ecx, edx
lea eax, [ebp - 0x25c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10001d6c
lea eax, [ebp - 0x25c]
push 0x100244e4
push eax
call fcn.100096c8
mov esi, eax
lea eax, [ebp - 0xa6b0]
push esi
push 1
push 0x40
push eax
call fcn.1000ba3e
mov ecx, dword [ebp - 0xa674]
push 0
add ecx, 4
push ecx
push esi
call fcn.1000be35
push esi
push 1
lea eax, [ebp - 0x18]
push 0x14
push eax
call fcn.1000ba3e
push esi
call fcn.1000b7d4
mov ax, word [ebp - 0x18]
mov ecx, 0x200
add esp, 0x38
cmp ax, cx
je 0x10001d6c
mov ecx, 0x8664
cmp ax, cx
je 0x10001d6c
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x10002399
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0xa6dc]
lea eax, [ebp - 0x25c]
push eax
call fcn.100017b0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007464
mov esp, ebp
pop ebp
ret
push 0x208
lea eax, [ebp - 0x874]
push 0
push eax
call fcn.10008540
add esp, 0xc
lea eax, [ebp - 0x874]
push 0x104
push eax
push 0
call ebx
lea eax, [ebp - 0x874]
push 0x2e
push eax
call fcn.10008229
add esp, 8
test eax, eax
je 0x10001dac
xor ecx, ecx
mov word [eax], cx
lea ecx, [ebp - 0x874]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10001db5
mov eax, dword [str..xml]
mov dword [ecx], eax
mov eax, dword [0x100241a8]
mov dword [ecx + 4], eax
mov ax, word [0x100241ac]
mov word [ecx + 8], ax
lea eax, [ebp - 0x874]
push eax
lea ecx, [ebp - 0xa6c0]
call fcn.10004580
lea ecx, [ebp - 0xa6c0]
call fcn.10004650
test al, al
je 0x10001e23
push str.Application
lea ecx, [ebp - 0xa6c0]
call fcn.10002e30
test eax, eax
je 0x10001e23
push str.RuntimePath
mov ecx, eax
call fcn.10002e30
test eax, eax
jne 0x10002197
mov eax, dword [ebp - 0xa687]
mov dword [ebp - method.TiXmlDocument.virtual_0], vtable.TiXmlDocument.0
test eax, eax
je 0x10001e40
push eax
call fcn.1000745f
add esp, 4
lea ecx, [ebp - 0xa6c0]
mov dword [ebp - 0xa687], 0
mov dword [ebp - 0xa683], 0
mov dword [ebp - 0xa67f], 0
call fcn.100027b0
push dword [ebp - 0xa6d4]
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0xa66c]
push eax
call fcn.100014e0
add esp, 0x10
test eax, eax
jne 0x1000236c
push 0x2000
push eax
lea eax, [ebp - 0x266c]
push eax
call fcn.10008540
add esp, 0xc
mov dword [ebp - 0xa6cc], 0x2000
lea eax, [ebp - 0xa6c4]
mov dword [ebp - 0xa6c8], 2
mov dword [ebp - 0xa6c4], 0
push eax
push 1
push 0
push 0x100246e8
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10001f1c
mov eax, dword [ebp - 0xa6c4]
test eax, eax
je 0x10001f1c
lea ecx, [ebp - 0xa6cc]
push ecx
lea ecx, [ebp - 0x266c]
push ecx
lea ecx, [ebp - 0xa6c8]
push ecx
push 0
push str.RuntimeVersion
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xa6c4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x266c]
xor edi, edi
push 0x2c
push eax
mov dword [ebp - 0xa6d8], edi
call fcn.10008162
add esp, 8
test eax, eax
je 0x10001f59
nop dword [eax]
add eax, 2
inc edi
push 0x2c
push eax
call fcn.10008162
add esp, 8
test eax, eax
jne 0x10001f40
mov dword [ebp - 0xa6d8], edi
xor ebx, ebx
mov ecx, 0x14
mov eax, edi
mul ecx
mov edx, 2
seto bl
xor ecx, ecx
neg ebx
or eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10007456
lea ecx, [edi + edi*4]
mov ebx, eax
shl ecx, 3
push ecx
push 0
push ebx
mov dword [ebp - 0xa6c4], ebx
call fcn.10008540
push 0
lea eax, [ebp - 0x266c]
push 0x100246e4
push eax
call fcn.100095ed
mov ecx, eax
add esp, 0x1c
test ecx, ecx
je 0x10001fe7
mov esi, ebx
mov edx, esi
add esi, 0x28
sub edx, ecx
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x10001fc0
push 0
push 0x10024734
push 0
call fcn.100095ed
mov ecx, eax
add esp, 0xc
test ecx, ecx
jne 0x10001fb6
xorps xmm0, xmm0
lea ecx, [edi - 1]
movq qword [ebp - 0xc], xmm0
mov dword [ebp - 0xa6c8], ecx
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x1c], xmm0
test ecx, ecx
jle 0x10002100
mov eax, ecx
mov dword [ebp - 0xa6cc], ecx
test ecx, ecx
jle 0x100020e4
lea edi, [ebp - 0x2c]
mov dword [ebp - 0xa6e0], ecx
mov eax, 0x28
lea edx, [ebp - 0x2c]
sub edi, ebx
mov esi, ebx
sub eax, edx
mov dword [ebp - 0xa6d0], eax
lea ebx, [esi + 0x28]
mov eax, esi
mov ecx, ebx
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10002066
test dx, dx
je 0x10002062
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10002066
add eax, 4
add ecx, 4
test dx, dx
jne 0x10002040
xor eax, eax
jmp 0x1000206b
sbb eax, eax
or eax, 1
test eax, eax
jle 0x100020c0
mov eax, esi
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [eax + edi - 2], cx
test cx, cx
jne 0x10002071
mov edx, esi
mov ecx, ebx
sub edx, ebx
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x10002090
mov edx, dword [ebp - 0xa6d0]
lea ecx, [ebp - 0x2c]
add edx, esi
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x100020b0
sub edi, 0x28
mov esi, ebx
sub dword [ebp - 0xa6e0], 1
jne 0x10002035
mov ecx, dword [ebp - 0xa6c8]
mov eax, dword [ebp - 0xa6cc]
mov ebx, dword [ebp - 0xa6c4]
dec ecx
sub eax, 1
mov dword [ebp - 0xa6c8], ecx
mov dword [ebp - 0xa6cc], eax
jne 0x10002010
mov edi, dword [ebp - 0xa6d8]
xor esi, esi
test edi, edi
jle 0x1000214c
mov edi, ebx
mov ebx, dword [ebp - 0xa6d8]
nop
lea ecx, [ebp - 0x54]
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1000213b
test dx, dx
je 0x10002137
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1000213b
add eax, 4
add ecx, 4
test dx, dx
jne 0x10002115
xor eax, eax
jmp 0x10002140
sbb eax, eax
or eax, 1
test eax, eax
jg 0x10002160
inc esi
add edi, 0x28
cmp esi, ebx
jl 0x10002110
mov esi, dword [ebp - 0xa6c4]
push esi
call fcn.1000745f
add esp, 4
jmp 0x1000236c
push dword [ebp - 0xa6d4]
lea eax, [ebp - 0x464]
push eax
lea eax, [esi + esi*4]
mov esi, dword [ebp - 0xa6c4]
lea eax, [esi + eax*8]
push eax
lea eax, [ebp - 0xa66c]
push eax
call fcn.100014e0
add esp, 0x10
push esi
call fcn.1000745f
add esp, 4
jmp 0x1000236c
mov ecx, eax
call fcn.10003900
mov edx, eax
test edx, edx
je 0x100021e6
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100021b0
sub ecx, esi
sar ecx, 1
je 0x100021e6
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100021c6
sub ecx, esi
lea eax, [ebp - 0x464]
sar ecx, 1
push ecx
push edx
push eax
call fcn.100095aa
add esp, 0xc
mov eax, dword [ebp - 0xa687]
mov dword [ebp - method.TiXmlDocument.virtual_0], vtable.TiXmlDocument.0
test eax, eax
je 0x10002203
push eax
call fcn.1000745f
add esp, 4
lea ecx, [ebp - 0xa6c0]
mov dword [ebp - 0xa687], 0
mov dword [ebp - 0xa683], 0
mov dword [ebp - 0xa67f], 0
call fcn.100027b0
lea ecx, [ebp - 0x464]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10002235
sub ecx, edx
sar ecx, 1
jne 0x1000226e
mov eax, dword [sym.imp.USER32.dll_wsprintfW]
push 0x100245d8
push dword [ebp - 0xa6dc]
call eax
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007464
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x464]
push 0x1002463c
push eax
call fcn.100082cd
add esp, 8
test eax, eax
jne 0x10002300
push 2
lea eax, [ebp - 0x464]
push 0x10024640
push eax
call fcn.10009570
add esp, 0xc
test eax, eax
je 0x10002300
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x666c]
push str._s.._s_
push eax
mov eax, dword [sym.imp.USER32.dll_wsprintfW]
call eax
lea edx, [ebp - 0xa66c]
add esp, 0x10
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x100022d0
lea edi, [ebp - 0x666c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100022e6
lea eax, [ebp - 0x666c]
push eax
push str.path
jmp 0x10002358
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x666c]
push 0x10024660
push eax
mov eax, dword [sym.imp.USER32.dll_wsprintfW]
call eax
lea edx, [ebp - 0xa66c]
add esp, 0xc
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10002325
lea edi, [ebp - 0x666c]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10002340
lea eax, [ebp - 0x666c]
push eax
push 0x10024668
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 0xa6d4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x10002397
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0xa6dc]
lea eax, [ebp - 0x464]
push eax
call fcn.100017b0
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10007464
mov esp, ebp
pop ebp
ret