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

Disassembly:
sub esp, 0x314
or ecx, 0xffffffff
xor eax, eax
push ebx
push ebp
push esi
push edi
mov edi, str.SCVSys.ini
mov ebp, dword [esp + 0x32c]
repne scasb al, byte es:[edi]
mov ebx, dword [esp + 0x328]
not ecx
dec ecx
sub ebp, ecx
dec ebp
test ebx, ebx
je 0x1003a1bb
test ebp, ebp
je 0x1003a1bb
push ebp
push ebx
push str.SKYSEA_INSTDIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x1003a197
lea eax, [esp + 0x18]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10039f93
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 0x10039fab
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
test eax, eax
je 0x10039fab
mov byte [eax + 1], 0
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsNetworkPathA]
test eax, eax
jne 0x1003a07d
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 0x1003a07d
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, ebp
jle 0x1003a04b
pop edi
pop esi
pop ebp
mov eax, 0xea
pop ebx
add esp, 0x314
ret 8
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.SKYSEA_INSTDIR
mov edx, ecx
mov esi, edi
mov edi, ebx
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 0x1003a197
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]
mov esi, eax
test esi, esi
jne 0x1003a17e
lea edx, [esp + 0x14]
mov dword [esp + 0x14], ebp
push edx
push ebx
push eax
push eax
mov eax, dword [esp + 0x20]
push str.SCVDIR
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
test esi, esi
jne 0x1003a17e
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x1003a17e
mov esi, 0xd
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1003a18d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
mov eax, esi
jne 0x1003a228
push 0x5c
push ebx
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
test eax, eax
jne 0x1003a1cd
pop edi
pop esi
mov byte [ebx], al
pop ebp
mov eax, 0xd
pop ebx
add esp, 0x314
ret 8
pop edi
pop esi
pop ebp
mov eax, 0x57
pop ebx
add esp, 0x314
ret 8
mov cl, byte [eax + 1]
test cl, cl
je 0x1003a1fe
mov edi, 0x100a27e8
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, ebx
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.SCVSys.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, ebx
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x314
ret 8