Function at 0x100022e0
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, 0xe6cc
call fcn.10007190
mov eax, dword [0x10032014]
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 - 0xe6bc], eax
mov eax, dword [ebp + 0x10]
push 0x208
mov dword [ebp - 0xe6c4], 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.10009460
push 0x208
lea eax, [ebp - 0x66c]
push 0
push eax
call fcn.10009460
push 0x4000
lea eax, [ebp - 0x866c]
push 0
push eax
call fcn.10009460
push 0x4000
lea eax, [ebp - 0x466c]
push 0
push eax
call fcn.10009460
push 0x208
lea eax, [ebp - 0x25c]
push 0
push eax
call fcn.10009460
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 - 0x866c]
push eax
push 0x1002459c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xe6b0]
push eax
push 1
push 0
push 0x10024720
push 0x80000002
mov dword [ebp - 0xe6b8], 0x104
mov dword [ebp - 0xe6b4], 1
mov dword [ebp - 0xe6b0], 0
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x10002429
mov eax, dword [ebp - 0xe6b0]
test eax, eax
je 0x10002429
lea ecx, [ebp - 0xe6b8]
push ecx
lea ecx, [ebp - 0x66c]
push ecx
lea ecx, [ebp - 0xe6b4]
push ecx
push 0
push str.Location
push eax
call ebx
push dword [ebp - 0xe6b0]
call esi
lea eax, [ebp - 0xe6b0]
mov dword [ebp - 0xe6b8], 0x104
push eax
push 1
push 0
push str.SoftwareSybasePowerBuilder22.0
push 0x80000002
mov dword [ebp - 0xe6b4], 1
mov dword [ebp - 0xe6b0], 0
call edi
test eax, eax
jne 0x10002493
mov eax, dword [ebp - 0xe6b0]
test eax, eax
je 0x10002493
lea ecx, [ebp - 0xe6b8]
push ecx
lea ecx, [ebp - 0x25c]
push ecx
lea ecx, [ebp - 0xe6b4]
push ecx
push 0
push str.IPS_Name
push eax
call ebx
push dword [ebp - 0xe6b0]
call esi
lea ecx, [ebp - 0x25c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100024a0
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
sub ecx, edx
sar ecx, 1
je 0x1000254a
lea ecx, [ebp - 0x66c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100024c4
sub ecx, edx
sar ecx, 1
je 0x1000254a
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x466c]
push str._s_sIDE_
push eax
call ebx
lea edx, [ebp - 0x866c]
add esp, 0x10
mov esi, edx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10002500
lea edi, [ebp - 0x466c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10002516
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 - 0x466c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x866e], ax
test ax, ax
jne 0x10002532
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 0x10002560
lea eax, [ebp - 0x25c]
push 0x5c
push eax
call fcn.10008ad0
add esp, 8
test eax, eax
je 0x10002592
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 0x100025a0
mov eax, dword [0x100247f4]
mov edx, dword [ebp - 0xe6bc]
mov esi, edx
mov dword [edi], eax
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x100025c0
lea edi, [ebp - 0x25c]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100025d6
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 0x100026ac
lea eax, [ebp - 0x25c]
push 0x10024704
push eax
call fcn.1000cd44
mov esi, eax
lea eax, [ebp - 0xe6ac]
push esi
push 1
push 0x40
push eax
call fcn.1000e4a4
mov ecx, dword [ebp - 0xe670]
push 0
add ecx, 4
push ecx
push esi
call fcn.1000e89b
push esi
push 1
lea eax, [ebp - 0x18]
push 0x14
push eax
call fcn.1000e4a4
push esi
call fcn.1000e23a
mov ax, word [ebp - 0x18]
mov ecx, 0x200
add esp, 0x38
cmp ax, cx
je 0x100026ac
mov ecx, 0x8664
cmp ax, cx
je 0x100026ac
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x10002b28
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0xe6c4]
lea eax, [ebp - 0x25c]
push eax
call fcn.10002060
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007173
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x464]
push eax
call fcn.100017b0
add esp, 4
test eax, eax
je 0x10002821
lea ecx, [ebp - 0x464]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100026d0
sub ecx, edx
sar ecx, 1
jne 0x10002704
push 0x100247f8
push dword [ebp - 0xe6c4]
call ebx
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007173
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x464]
push 0x1002485c
push eax
call fcn.10008b71
add esp, 8
test eax, eax
jne 0x100027b1
push 2
lea eax, [ebp - 0x464]
push 0x10024860
push eax
call fcn.1000cbec
add esp, 0xc
test eax, eax
je 0x100027b1
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x466c]
push str._s.._s_
push eax
call ebx
lea edx, [ebp - 0x866c]
add esp, 0x10
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10002761
lea edi, [ebp - 0x466c]
sub edx, esi
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10002780
mov ecx, edx
lea eax, [ebp - 0x466c]
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 0x10002afb
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x466c]
push 0x10024880
push eax
call ebx
lea edx, [ebp - 0x866c]
add esp, 0xc
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x100027d1
lea edi, [ebp - 0x466c]
sub edx, esi
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100027f0
mov ecx, edx
lea eax, [ebp - 0x466c]
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 0x10024888
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x10002afb
push dword [ebp - 0xe6bc]
lea eax, [ebp - 0x464]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x866c]
push eax
call fcn.10001d80
add esp, 0x10
test eax, eax
jne 0x10002afb
push 0x6000
push eax
lea eax, [ebp - 0xe66c]
push eax
call fcn.10009460
add esp, 0xc
mov dword [ebp - 0xe6b8], 0x6000
lea eax, [ebp - 0xe6b0]
mov dword [ebp - 0xe6b4], 2
mov dword [ebp - 0xe6b0], 0
push eax
push 1
push 0
push 0x10024908
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100028d4
mov eax, dword [ebp - 0xe6b0]
test eax, eax
je 0x100028d4
lea ecx, [ebp - 0xe6b8]
push ecx
lea ecx, [ebp - 0xe66c]
push ecx
lea ecx, [ebp - 0xe6b4]
push ecx
push 0
push str.RuntimeVersion
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xe6b0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0xe66c]
xor edi, edi
push 0x2c
push eax
mov dword [ebp - 0xe6c0], edi
call fcn.10008a09
add esp, 8
test eax, eax
je 0x1000290a
add eax, 2
inc edi
push 0x2c
push eax
call fcn.10008a09
add esp, 8
test eax, eax
jne 0x100028f1
mov dword [ebp - 0xe6c0], 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.10007165
lea ecx, [edi + edi*4]
mov ebx, eax
shl ecx, 3
push ecx
push 0
push ebx
mov dword [ebp - 0xe6b0], ebx
call fcn.10009460
push 0
lea eax, [ebp - 0xe66c]
push 0x10024904
push eax
call fcn.1000cc69
mov ecx, eax
add esp, 0x1c
test ecx, ecx
je 0x10002997
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 0x10002970
push 0
push 0x10024954
push 0
call fcn.1000cc69
mov ecx, eax
add esp, 0xc
test ecx, ecx
jne 0x10002967
xorps xmm0, xmm0
lea ecx, [edi - 1]
movq qword [ebp - 0xc], xmm0
mov dword [ebp - 0xe6b4], ecx
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x1c], xmm0
test ecx, ecx
jle 0x10002aa1
mov eax, ecx
mov dword [ebp - 0xe6b8], ecx
test ecx, ecx
jle 0x10002a85
lea esi, [ebp - 0x2c]
mov dword [ebp - 0xe6c8], ecx
mov eax, 0x28
lea edx, [ebp - 0x2c]
sub esi, ebx
mov edi, ebx
sub eax, edx
mov dword [ebp - 0xe6cc], eax
lea ecx, [edi + 0x28]
mov eax, edi
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10002a16
test dx, dx
je 0x10002a12
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10002a16
add eax, 4
add ecx, 4
test dx, dx
jne 0x100029f0
xor eax, eax
jmp 0x10002a1b
sbb eax, eax
or eax, 1
test eax, eax
jle 0x10002a60
mov ecx, edi
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x10002a21
lea eax, [edi + 0x28]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [eax - 0x2a], cx
test cx, cx
jne 0x10002a34
mov edx, dword [ebp - 0xe6cc]
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 0x10002a50
sub esi, 0x28
add edi, 0x28
sub dword [ebp - 0xe6c8], 1
jne 0x100029e5
mov ecx, dword [ebp - 0xe6b4]
mov eax, dword [ebp - 0xe6b8]
mov ebx, dword [ebp - 0xe6b0]
dec ecx
sub eax, 1
mov dword [ebp - 0xe6b4], ecx
mov dword [ebp - 0xe6b8], eax
jne 0x100029c0
mov edi, dword [ebp - 0xe6c0]
xor esi, esi
test edi, edi
jle 0x10002aec
mov edi, ebx
mov ebx, dword [ebp - 0xe6c0]
nop
lea ecx, [ebp - 0x54]
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10002adb
test dx, dx
je 0x10002ad7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10002adb
add eax, 4
add ecx, 4
test dx, dx
jne 0x10002ab5
xor eax, eax
jmp 0x10002ae0
sbb eax, eax
or eax, 1
test eax, eax
jg 0x10002b39
inc esi
add edi, 0x28
cmp esi, ebx
jl 0x10002ab0
mov esi, dword [ebp - 0xe6b0]
push esi
call fcn.1000716e
add esp, 4
push dword [ebp - 0xe6bc]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x10002b26
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0xe6c4]
lea eax, [ebp - 0x464]
push eax
call fcn.10002060
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10007173
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xe6bc]
lea eax, [ebp - 0x464]
push eax
lea eax, [esi + esi*4]
mov esi, dword [ebp - 0xe6b0]
lea eax, [esi + eax*8]
push eax
lea eax, [ebp - 0x866c]
push eax
call fcn.10001d80
add esp, 0x10
jmp 0x10002af2