Function at 0x10001e40
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, 0xa6cc
call fcn.10006ce0
mov eax, dword [0x10031014]
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 - 0xa6bc], eax
mov eax, dword [ebp + 0x10]
push 0x208
mov dword [ebp - 0xa6c4], 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.10008fa0
push 0x208
lea eax, [ebp - 0x66c]
push 0
push eax
call fcn.10008fa0
push 0x4000
lea eax, [ebp - 0xa66c]
push 0
push eax
call fcn.10008fa0
push 0x4000
lea eax, [ebp - 0x666c]
push 0
push eax
call fcn.10008fa0
push 0x208
lea eax, [ebp - 0x25c]
push 0
push eax
call fcn.10008fa0
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 0x10023494
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xa6b0]
push eax
push 1
push 0
push 0x10023530
push 0x80000002
mov dword [ebp - 0xa6b8], 0x104
mov dword [ebp - 0xa6b4], 1
mov dword [ebp - 0xa6b0], 0
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x10001f89
mov eax, dword [ebp - 0xa6b0]
test eax, eax
je 0x10001f89
lea ecx, [ebp - 0xa6b8]
push ecx
lea ecx, [ebp - 0x66c]
push ecx
lea ecx, [ebp - 0xa6b4]
push ecx
push 0
push str.Location
push eax
call ebx
push dword [ebp - 0xa6b0]
call esi
lea eax, [ebp - 0xa6b0]
mov dword [ebp - 0xa6b8], 0x104
push eax
push 1
push 0
push str.SoftwareSybasePowerBuilder22.0
push 0x80000002
mov dword [ebp - 0xa6b4], 1
mov dword [ebp - 0xa6b0], 0
call edi
test eax, eax
jne 0x10001ff3
mov eax, dword [ebp - 0xa6b0]
test eax, eax
je 0x10001ff3
lea ecx, [ebp - 0xa6b8]
push ecx
lea ecx, [ebp - 0x25c]
push ecx
lea ecx, [ebp - 0xa6b4]
push ecx
push 0
push str.IPS_Name
push eax
call ebx
push dword [ebp - 0xa6b0]
call esi
lea ecx, [ebp - 0x25c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10002000
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
sub ecx, edx
sar ecx, 1
je 0x100020aa
lea ecx, [ebp - 0x66c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10002024
sub ecx, edx
sar ecx, 1
je 0x100020aa
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x666c]
push str._s_sIDE_
push eax
call ebx
lea edx, [ebp - 0xa66c]
add esp, 0x10
mov esi, edx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10002060
lea edi, [ebp - 0x666c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10002076
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 0x10002092
push 0x104
lea eax, [ebp - 0x66c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x66c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x25e], ax
test ax, ax
jne 0x100020c0
lea eax, [ebp - 0x25c]
push 0x5c
push eax
call fcn.1000861d
add esp, 8
test eax, eax
je 0x100020f2
xor ecx, ecx
mov word [eax], cx
lea edi, [ebp - 0x25c]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10002100
mov eax, dword [0x10023604]
mov edx, dword [ebp - 0xa6bc]
mov esi, edx
mov dword [edi], eax
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10002120
lea edi, [ebp - 0x25c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10002136
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 0x1000220c
lea eax, [ebp - 0x25c]
push 0x10023514
push eax
call fcn.1000c618
mov esi, eax
lea eax, [ebp - 0xa6ac]
push esi
push 1
push 0x40
push eax
call fcn.1000de04
mov ecx, dword [ebp - 0xa670]
push 0
add ecx, 4
push ecx
push esi
call fcn.1000e1fb
push esi
push 1
lea eax, [ebp - 0x18]
push 0x14
push eax
call fcn.1000de04
push esi
call fcn.1000db9a
mov ax, word [ebp - 0x18]
mov ecx, 0x200
add esp, 0x38
cmp ax, cx
je 0x1000220c
mov ecx, 0x8664
cmp ax, cx
je 0x1000220c
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x10002688
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0xa6c4]
lea eax, [ebp - 0x25c]
push eax
call fcn.10001c50
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10006cc3
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x464]
push eax
call fcn.100013a0
add esp, 4
test eax, eax
je 0x10002381
lea ecx, [ebp - 0x464]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10002230
sub ecx, edx
sar ecx, 1
jne 0x10002264
push 0x10023608
push dword [ebp - 0xa6c4]
call ebx
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10006cc3
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x464]
push 0x1002366c
push eax
call fcn.100086be
add esp, 8
test eax, eax
jne 0x10002311
push 2
lea eax, [ebp - 0x464]
push 0x10023670
push eax
call fcn.1000c4c0
add esp, 0xc
test eax, eax
je 0x10002311
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x666c]
push str._s.._s_
push eax
call ebx
lea edx, [ebp - 0xa66c]
add esp, 0x10
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x100022c1
lea edi, [ebp - 0x666c]
sub edx, esi
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100022e0
mov ecx, edx
lea eax, [ebp - 0x666c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push str.path
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x1000265b
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x666c]
push 0x10023690
push eax
call ebx
lea edx, [ebp - 0xa66c]
add esp, 0xc
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10002331
lea edi, [ebp - 0x666c]
sub edx, esi
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10002350
mov ecx, edx
lea eax, [ebp - 0x666c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x10023698
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x1000265b
push dword [ebp - 0xa6bc]
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0xa66c]
push eax
call fcn.10001970
add esp, 0x10
test eax, eax
jne 0x1000265b
push 0x2000
push eax
lea eax, [ebp - 0x266c]
push eax
call fcn.10008fa0
add esp, 0xc
mov dword [ebp - 0xa6b8], 0x2000
lea eax, [ebp - 0xa6b0]
mov dword [ebp - 0xa6b4], 2
mov dword [ebp - 0xa6b0], 0
push eax
push 1
push 0
push 0x10023718
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10002434
mov eax, dword [ebp - 0xa6b0]
test eax, eax
je 0x10002434
lea ecx, [ebp - 0xa6b8]
push ecx
lea ecx, [ebp - 0x266c]
push ecx
lea ecx, [ebp - 0xa6b4]
push ecx
push 0
push str.RuntimeVersion
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xa6b0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x266c]
xor edi, edi
push 0x2c
push eax
mov dword [ebp - 0xa6c0], edi
call fcn.10008556
add esp, 8
test eax, eax
je 0x1000246a
add eax, 2
inc edi
push 0x2c
push eax
call fcn.10008556
add esp, 8
test eax, eax
jne 0x10002451
mov dword [ebp - 0xa6c0], 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.10006cb5
lea ecx, [edi + edi*4]
mov ebx, eax
shl ecx, 3
push ecx
push 0
push ebx
mov dword [ebp - 0xa6b0], ebx
call fcn.10008fa0
push 0
lea eax, [ebp - 0x266c]
push 0x10023714
push eax
call fcn.1000c53d
mov ecx, eax
add esp, 0x1c
test ecx, ecx
je 0x100024f7
mov esi, ebx
mov edx, esi
add esi, 0x28
sub edx, ecx
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x100024d0
push 0
push 0x10023764
push 0
call fcn.1000c53d
mov ecx, eax
add esp, 0xc
test ecx, ecx
jne 0x100024c7
xorps xmm0, xmm0
lea ecx, [edi - 1]
movq qword [ebp - 0xc], xmm0
mov dword [ebp - 0xa6b4], ecx
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x1c], xmm0
test ecx, ecx
jle 0x10002601
mov eax, ecx
mov dword [ebp - 0xa6b8], ecx
test ecx, ecx
jle 0x100025e5
lea esi, [ebp - 0x2c]
mov dword [ebp - 0xa6c8], ecx
mov eax, 0x28
lea edx, [ebp - 0x2c]
sub esi, ebx
mov edi, ebx
sub eax, edx
mov dword [ebp - 0xa6cc], eax
lea ecx, [edi + 0x28]
mov eax, edi
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10002576
test dx, dx
je 0x10002572
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10002576
add eax, 4
add ecx, 4
test dx, dx
jne 0x10002550
xor eax, eax
jmp 0x1000257b
sbb eax, eax
or eax, 1
test eax, eax
jle 0x100025c0
mov ecx, edi
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x10002581
lea eax, [edi + 0x28]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [eax - 0x2a], cx
test cx, cx
jne 0x10002594
mov edx, dword [ebp - 0xa6cc]
lea ecx, [ebp - 0x2c]
add edx, edi
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x100025b0
sub esi, 0x28
add edi, 0x28
sub dword [ebp - 0xa6c8], 1
jne 0x10002545
mov ecx, dword [ebp - 0xa6b4]
mov eax, dword [ebp - 0xa6b8]
mov ebx, dword [ebp - 0xa6b0]
dec ecx
sub eax, 1
mov dword [ebp - 0xa6b4], ecx
mov dword [ebp - 0xa6b8], eax
jne 0x10002520
mov edi, dword [ebp - 0xa6c0]
xor esi, esi
test edi, edi
jle 0x1000264c
mov edi, ebx
mov ebx, dword [ebp - 0xa6c0]
nop
lea ecx, [ebp - 0x54]
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1000263b
test dx, dx
je 0x10002637
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1000263b
add eax, 4
add ecx, 4
test dx, dx
jne 0x10002615
xor eax, eax
jmp 0x10002640
sbb eax, eax
or eax, 1
test eax, eax
jg 0x10002699
inc esi
add edi, 0x28
cmp esi, ebx
jl 0x10002610
mov esi, dword [ebp - 0xa6b0]
push esi
call fcn.10006cbe
add esp, 4
push dword [ebp - 0xa6bc]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x10002686
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0xa6c4]
lea eax, [ebp - 0x464]
push eax
call fcn.10001c50
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10006cc3
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xa6bc]
lea eax, [ebp - 0x464]
push eax
lea eax, [esi + esi*4]
mov esi, dword [ebp - 0xa6b0]
lea eax, [esi + eax*8]
push eax
lea eax, [ebp - 0xa66c]
push eax
call fcn.10001970
add esp, 0x10
jmp 0x10002652