Function at 0x41d8b0
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value
Read .ini file

Disassembly:
sub esp, 0x324
push ebx
mov ebx, dword [esp + 0x330]
push ebp
mov dword [esp + 0xc], ecx
mov ebp, dword [esp + 0x330]
push edi
mov ecx, 0x42
xor eax, eax
lea edi, [esp + 0x124]
mov dword [esp + 0x120], 0
rep stosd dword es:[edi], eax
push ebx
lea eax, [esp + 0x128]
push 0x104
push eax
push 0x4db968
push str.LOGFILE
push ebp
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x41dcab
lea ecx, [esp + 0x124]
push esi
test ecx, ecx
je 0x41dc55
lea edi, [esp + 0x128]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x41dc55
mov ecx, 0x40
lea edi, [esp + 0x231]
mov byte [esp + 0x230], al
lea edx, [esp + 0x230]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edi, [esp + 0x128]
or ecx, 0xffffffff
xor eax, eax
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]
lea ecx, [esp + 0x230]
push ecx
call dword [sym.imp.MSVCRT.dll__strupr]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], 0
rep stosd dword es:[edi], eax
add esp, 4
lea edx, [esp + 0x20]
stosw word es:[edi], ax
push 0x104
push edx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ebx, dword [sym.imp.MSVCRT.dll_strstr]
lea eax, [esp + 0x230]
push str._WINDIR_
push eax
call ebx
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41da31
mov edi, str._WINDIR_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
or ecx, 0xffffffff
add edi, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str._WINDIR_
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x24]
add ecx, ebp
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, ebp
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x20]
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x20]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x230]
push str._SYSTEMDIR_
push ecx
call ebx
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41dabf
mov edi, str._SYSTEMDIR_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
or ecx, 0xffffffff
add edi, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str._SYSTEMDIR_
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x24]
add ecx, ebp
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, ebp
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x20]
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x20]
push 0x104
push eax
push str._ProgramFiles_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea ecx, [esp + 0x230]
push str._PROGRAMDIR_
push ecx
call ebx
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41db52
mov edi, str._PROGRAMDIR_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
or ecx, 0xffffffff
add edi, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str._PROGRAMDIR_
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x24]
add ecx, ebp
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, ebp
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x20]
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x10]
push eax
push 1
push 0
push str.SoftwareGlobalLinkGameShare
push bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41dbab
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
push eax
push 0
push str.Path
push ecx
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x230]
push str._SHARE_
push eax
call ebx
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41dc29
mov edi, str._SHARE_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
or ecx, 0xffffffff
add edi, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str._SHARE_
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x24]
add ecx, ebp
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, ebp
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esp + 0x20]
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x230]
push 0x104
lea ecx, [esp + 0x12c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
mov ebp, dword [esp + 0x344]
mov ebx, dword [esp + 0x348]
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push ebx
push 0xffffffffffffffff
push str.LOGID
push ebp
call esi
push ebx
push 1
push str.DELETE
push ebp
mov dword [esp + 0x134], eax
call esi
mov edx, dword [esp + 0x14]
mov dword [esp + 0x22c], eax
lea eax, [esp + 0x124]
lea ecx, [edx + 0x14]
push eax
push 1
mov edx, dword [ecx + 8]
push edx
call fcn.0041e150
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x324
ret 8
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x324
ret 8