Function at 0x10045690
Capabilities:
Check if file exists
Get file attributes
Query environment variable
Query or enumerate registry value
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x314
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll__mbsrchr]
push ebp
mov ebp, ecx
push esi
push edi
test ebp, ebp
mov dword [ebp + 0x400], eax
mov byte [ebp], 0
je 0x100458e9
push 0x400
push ebp
push str.SKYSEA_INSTDIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x100458e9
lea ecx, [esp + 0x18]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10045714
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x100a2820
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x10045728
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call ebx
add esp, 8
test eax, eax
je 0x10045728
mov byte [eax + 1], 0
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsNetworkPathA]
test eax, eax
jne 0x100457ee
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x220]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x220]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.SCVSys.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x220]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x100457ee
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x400
jg 0x100458e9
lea edi, [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov edx, ecx
mov esi, edi
mov edi, ebp
push str.SKYSEA_INSTDIR
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_SetEnvironmentVariableA]
jmp 0x100458e9
mov al, byte [0x100aba18]
mov ecx, 0x40
mov byte [esp + 0x11c], al
xor eax, eax
lea edi, [esp + 0x11d]
lea edx, [esp + 0x11c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
or ecx, 0xffffffff
mov edi, str.SOFTWARESky_ProductSKYSEAClientView
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x11c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x10], eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x100a27e8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x11c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ScvInst
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 1
lea ecx, [esp + 0x124]
push 0
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100458da
lea edx, [esp + 0x14]
mov dword [esp + 0x14], 0x400
push edx
push ebp
push eax
push eax
mov eax, dword [esp + 0x20]
push str.SCVDIR
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x100458e9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x5c
push ebp
call ebx
mov edx, eax
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ecx, [ecx + ebp - 1]
cmp edx, ecx
jne 0x10045909
mov byte [edx], al
push 0x5c
push ebp
call ebx
mov edx, eax
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + ebp - 1]
cmp edx, eax
jne 0x1004592a
mov byte [edx], 0
mov edi, str.AppSetNative.ini
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x314
ret 4