Function at 0x100462c0
Capabilities:
Check if file exists
Get file attributes
Query environment variable
Query or enumerate registry value
Read .ini file
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x1008efec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x554
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x4c], ebp
xor ebx, ebx
mov dword [ebp], 0x100944f4
mov dword [esp + 0x56c], ebx
mov al, byte [esp + 0x12]
lea ecx, [ebp + 0xc]
mov byte [ebp + 4], bl
mov dword [ebp + 8], ebx
push ebx
mov byte [esp + 0x570], 1
mov byte [ecx], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov dl, byte [esp + 0x12]
lea ecx, [ebp + 0x1c]
push ebx
mov byte [esp + 0x570], 2
mov byte [ecx], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [esp + 0x12]
lea ecx, [ebp + 0x2c]
push ebx
mov byte [esp + 0x570], 3
mov byte [ecx], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov dl, byte [esp + 0x12]
lea ecx, [ebp + 0x3c]
push ebx
mov byte [esp + 0x570], 4
mov byte [ecx], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [esp + 0x12]
mov dl, byte [esp + 0x12]
lea ecx, [ebp + 0x4c]
mov byte [esp + 0x56c], 5
mov byte [ecx], al
mov byte [ecx + 1], dl
mov byte [ecx + 8], bl
call fcn.10050990
lea ecx, [ebp + 0x5c]
mov byte [esp + 0x56c], 6
call fcn.10067d80
lea ecx, [ebp + 0x68]
mov byte [esp + 0x56c], 7
call fcn.10069050
mov al, byte [esp + 0x12]
mov dword [ebp + 0x104], ebx
mov byte [ebp + 0x100], al
mov dword [ebp + 0x108], ebx
mov dword [ebp + 0x10c], ebx
mov cl, byte [esp + 0x12]
mov dword [ebp + 0x114], ebx
mov byte [ebp + 0x110], cl
mov dword [ebp + 0x118], ebx
mov dword [ebp + 0x11c], ebx
mov dl, byte [esp + 0x12]
mov dword [ebp + 0x124], ebx
mov byte [ebp + 0x120], dl
mov dword [ebp + 0x128], ebx
mov dword [ebp + 0x12c], ebx
lea eax, [esp + 0x12]
mov byte [esp + 0x56c], 0xb
push eax
lea ecx, [ebp + 0x130]
push ebx
lea edx, [esp + 0x1b]
push edx
call fcn.100502d0
mov al, byte [esp + 0x13]
lea ecx, [ebp + 0x148]
mov dword [ebp + 0x140], ebx
mov dword [ebp + 0x144], ebx
push ebx
mov byte [esp + 0x570], 0xc
mov byte [ecx], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x155]
mov byte [esp + 0x154], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp], 0x100944ec
mov dword [esp + 0x2c], 1
stosb byte es:[edi], al
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], 0x10093764
mov byte [esp + 0x38], bl
lea ecx, [esp + 0x154]
mov byte [esp + 0x56c], 0xe
test ecx, ecx
je 0x100466d4
lea edx, [esp + 0x154]
push 0x208
push edx
push str.SKYSEA_INSTDIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x100466d4
lea eax, [esp + 0x50]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, ebx
jne 0x100464e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x100a2820
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
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 0x100464fe
lea ecx, [esp + 0x50]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
cmp eax, ebx
je 0x100464fe
mov byte [eax + 1], bl
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsNetworkPathA]
test eax, eax
jne 0x100465d2
lea edi, [esp + 0x50]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x460]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x460]
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 + 0x460]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x100465d2
lea edi, [esp + 0x50]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x208
jg 0x100466d4
lea edi, [esp + 0x50]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x154]
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]
lea ecx, [esp + 0x154]
push ecx
push str.SKYSEA_INSTDIR
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
jmp 0x100466d4
mov dl, byte [0x100aba18]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x35d]
mov byte [esp + 0x35c], dl
lea edx, [esp + 0x35c]
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
mov dword [esp + 0x14], ebx
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 + 0x35c]
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, 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 + 0x35c]
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 + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 1
lea ecx, [esp + 0x364]
push ebx
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x100466c5
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
lea eax, [esp + 0x154]
push edx
push eax
push ebx
push ebx
push str.SCVDIR
push ecx
mov dword [esp + 0x30], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x100466d4
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x154]
push str..SettingAssets.ini
lea eax, [esp + 0x20]
push edx
push eax
call fcn.10067940
add esp, 0xc
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x56c], 0xf
mov edx, dword [ecx]
lea ecx, [ebp + 0xc]
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x570], 0xe
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [esp + 0x154]
push str..CacheConnectionHistory.txt
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.10067940
add esp, 0xc
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x56c], 0x10
mov ecx, dword [edx]
push ecx
push ebx
push eax
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x570], 0xe
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea edx, [esp + 0x154]
push str..CacheConnectionHistory_IPv6.txt
lea eax, [esp + 0x20]
push edx
push eax
call fcn.10067940
add esp, 0xc
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x56c], 0x11
mov edx, dword [ecx]
lea ecx, [ebp + 0x2c]
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x570], 0xe
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [esp + 0x154]
push str..UserSetIceCfg.ini
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.10067940
add esp, 0xc
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x56c], 0x12
mov ecx, dword [edx]
push ecx
push ebx
push eax
lea ecx, [ebp + 0x3c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x570], 0xe
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push str..AppSetNative.ini
lea edx, [esp + 0x158]
lea eax, [esp + 0x40]
push edx
push eax
call fcn.10067940
add esp, 0xc
mov eax, dword [esp + 0x40]
mov byte [esp + 0x56c], 0x13
cmp eax, ebx
jne 0x1004682b
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call fcn.10067ca0
add esp, 4
test al, al
je 0x1004685a
mov eax, dword [esp + 0x40]
cmp eax, ebx
jne 0x10046845
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push ebx
push str.AgentType
push str.Setting
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp + 8], eax
push 0x1388
lea ecx, [ebp + 0x68]
call fcn.1006a960
mov eax, dword [esp + 0x40]
cmp eax, ebx
je 0x1004688c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x10046883
cmp al, 0xff
je 0x10046883
dec al
mov byte [ecx], al
jmp 0x1004688c
push ecx
call fcn.10088e50
add esp, 4
mov ecx, dword [esp + 0x564]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x560
ret