Function at 0x10003cc0
Capabilities:
Check if file exists
Get file attributes
Initialize winsock library
Query environment variable
Query or enumerate registry value
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x1008ad04
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5e0
push ebx
push ebp
xor ebx, ebx
mov ebp, 0x10093764
push esi
push edi
mov dword [esp + 0x3c], 1
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebp
mov byte [esp + 0x48], bl
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], bl
rep stosd dword es:[edi], eax
mov ecx, 0x63
lea edi, [esp + 0x462]
mov word [esp + 0x460], bx
mov dword [esp + 0x5f8], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push str.F:SCVICEIceServiceIceService.cpp
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], 0x4d
call fcn.10038570
mov ecx, dword [0x100ababc]
push 0xffffffffffffffff
push ecx
push 0x1000
push str.IceSvc.log
mov ecx, eax
mov byte [esp + 0x608], 1
call fcn.100385e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], bl
call fcn.100385c0
push ebx
call fcn.10006e10
add esp, 4
push ebx
push 1
call dword [sym.imp.KERNEL32.dll_SetProcessShutdownParameters]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10003ddf
call edi
lea edx, [esp + 0x10]
lea ecx, [esp + 0x18]
push edx
push str.F:SCVICEIceServiceIceService.cpp
mov esi, eax
mov dword [esp + 0x18], 0x5a
call fcn.10038570
push esi
push str._ServiceFrame_OnInit_
push 1
push eax
mov byte [esp + 0x608], 2
call fcn.100386d0
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], bl
call fcn.100385c0
push str.SKYSEA_ICE_SVC_EVT_IceSvc
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x100abab0], eax
call edi
mov esi, eax
mov eax, dword [0x100abab0]
cmp eax, ebx
jne 0x10003e4b
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push str.F:SCVICEIceServiceIceService.cpp
mov dword [esp + 0x18], 0x66
call fcn.10038570
push esi
push 0x100a328c
push 1
push eax
mov byte [esp + 0x608], 3
call fcn.100386d0
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], bl
call fcn.100385c0
xor al, al
jmp 0x10004397
cmp esi, 0xb7
jne 0x10003e9d
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x6a
push ecx
push str.F:SCVICEIceServiceIceService.cpp
lea ecx, [esp + 0x20]
call fcn.10038570
push 0x100a325c
push 1
push eax
mov byte [esp + 0x604], 4
call fcn.100386d0
add esp, 0xc
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], bl
call fcn.100385c0
xor al, al
jmp 0x10004397
lea edx, [esp + 0x460]
push edx
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
cmp esi, ebx
je 0x10003efe
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push str.F:SCVICEIceServiceIceService.cpp
mov dword [esp + 0x18], 0x74
call fcn.10038570
push esi
push str._ServiceFrame_OnInit_WinSock
push 1
push eax
mov byte [esp + 0x608], 5
call fcn.100386d0
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], bl
call fcn.100385c0
xor al, al
jmp 0x10004397
cmp word [esp + 0x460], 2
je 0x10003f53
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x78
push ecx
push str.F:SCVICEIceServiceIceService.cpp
lea ecx, [esp + 0x20]
call fcn.10038570
push str._ServiceFrame_OnInit_WinSock2.0
push 1
push eax
mov byte [esp + 0x604], 6
call fcn.100386d0
add esp, 0xc
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], bl
call fcn.100385c0
xor al, al
jmp 0x10004397
lea edx, [esp + 0x4c]
test edx, edx
je 0x100041b4
lea eax, [esp + 0x4c]
push 0x104
push eax
push str.SKYSEA_INSTDIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x100041b4
lea ecx, [esp + 0x154]
push 0x104
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, ebx
jne 0x10003fc1
call edi
mov edi, 0x100a2820
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x154]
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 0x10003fdb
lea ecx, [esp + 0x154]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll__mbsrchr]
add esp, 8
cmp eax, ebx
je 0x10003fdb
mov byte [eax + 1], bl
lea edx, [esp + 0x154]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsNetworkPathA]
test eax, eax
jne 0x100040b5
lea edi, [esp + 0x154]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x35c]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x35c]
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 + 0x35c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x100040b5
lea edi, [esp + 0x154]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x104
jg 0x100041b4
lea edi, [esp + 0x154]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x4c]
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 + 0x4c]
push ecx
push str.SKYSEA_INSTDIR
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
jmp 0x100041b4
mov dl, byte [0x100aba18]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x259]
mov byte [esp + 0x258], dl
lea edx, [esp + 0x258]
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 + 0x10], 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 + 0x258]
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 + 0x258]
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 + 0x260]
push ebx
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x100041a5
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
lea eax, [esp + 0x4c]
push edx
push eax
push ebx
push ebx
push str.SCVDIR
push ecx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x100041b4
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [esp + 0x4c]
push str.UserSet
push edx
call esi
lea eax, [esp + 0x4c]
push str.IceCfg.ini
push eax
call esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x84
push ecx
push str.F:SCVICEIceServiceIceService.cpp
lea ecx, [esp + 0x20]
call fcn.10038570
lea edx, [esp + 0x4c]
mov byte [esp + 0x5f8], 7
push edx
push 0x100a31a0
push ebx
push eax
call fcn.100386d0
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], bl
call fcn.100385c0
mov dword [esp + 0x2c], 1
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebp
mov byte [esp + 0x38], bl
lea eax, [esp + 0x28]
lea ecx, [esp + 0x2c]
push eax
push ebx
mov byte [esp + 0x600], 8
call fcn.100043b0
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x8e
push ecx
push str.F:SCVICEIceServiceIceService.cpp
lea ecx, [esp + 0x20]
call fcn.10038570
mov edx, dword [esp + 0x28]
mov byte [esp + 0x5f8], 9
push edx
push 0x100a3160
push ebx
push eax
call fcn.100386d0
add esp, 0x10
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], 8
call fcn.100385c0
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x4c]
push eax
push ecx
mov ecx, 0x100aba30
call fcn.100011c0
test eax, eax
jne 0x1000431a
lea edx, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
push str.F:SCVICEIceServiceIceService.cpp
mov dword [esp + 0x1c], 0x95
call fcn.10038570
push str._ServiceFrame_OnInit_ICE
push 1
push eax
mov byte [esp + 0x604], 0xa
call fcn.100386d0
add esp, 0xc
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], 8
call fcn.100385c0
mov eax, dword [esp + 0x34]
mov byte [esp + 0x5f8], bl
cmp eax, ebx
mov dword [esp + 0x30], ebp
je 0x10004316
push eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x10004316
mov ecx, esi
call fcn.10005c10
mov ecx, esi
call fcn.10052ec0
xor al, al
jmp 0x10004397
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push str.F:SCVICEIceServiceIceService.cpp
mov dword [esp + 0x1c], 0x99
call fcn.10038570
push 0x100a30fc
push ebx
push eax
mov byte [esp + 0x604], 0xb
call fcn.100386d0
add esp, 0xc
lea ecx, [esp + 0x18]
mov byte [esp + 0x5f8], 8
call fcn.100385c0
mov eax, dword [esp + 0x34]
mov byte [esp + 0x5f8], bl
cmp eax, ebx
mov dword [esp + 0x30], ebp
je 0x10004395
push eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x10004395
mov ecx, dword [esi + 8]
cmp ecx, ebx
je 0x1000438b
push 1
call fcn.10005c40
mov ecx, esi
mov dword [esi + 8], ebx
call fcn.10052ec0
mov al, 1
mov ecx, dword [esp + 0x5f0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5ec
ret