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

Disassembly:
sub esp, 0x52c
push ebx
push ebp
push esi
mov dword [esp + 0x10], ecx
push edi
mov ecx, 0xc4
xor eax, eax
lea edi, [esp + 0x229]
mov byte [esp + 0x228], 0
mov ebx, dword [esp + 0x544]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov esi, dword [esp + 0x540]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
stosb byte es:[edi], al
push ebx
lea eax, [esp + 0x22c]
push 0x104
push eax
push 0x4db948
push str.FILE
push esi
call ebp
test eax, eax
je 0x41d78b
lea ecx, [esp + 0x228]
test ecx, ecx
je 0x41d6f0
lea edi, [esp + 0x228]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x41d6f0
mov ecx, 0x40
lea edi, [esp + 0x125]
mov byte [esp + 0x124], al
lea edx, [esp + 0x124]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edi, [esp + 0x228]
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 + 0x124]
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]
lea eax, [esp + 0x124]
push str._WINDIR_
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41d4c1
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 + 0x124]
push str._SYSTEMDIR_
push ecx
call dword [sym.imp.MSVCRT.dll_strstr]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41d553
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 + 0x124]
push str._PROGRAMDIR_
push ecx
call dword [sym.imp.MSVCRT.dll_strstr]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41d5ea
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 0x41d643
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 + 0x124]
push str._SHARE_
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x41d6c5
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 + 0x124]
push 0x104
lea ecx, [esp + 0x22c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov esi, dword [esp + 0x54c]
add esp, 0xc
lea edx, [esp + 0x228]
push edx
call fcn.00455c40
add esp, 4
test eax, eax
jne 0x41d711
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x52c
ret 8
push ebx
lea eax, [esp + 0x330]
push 0x104
push eax
push 0x4db948
push str.ARGUMENT
push esi
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push ebx
push 0x64
push str.RANDOM
push esi
call edi
push ebx
push 0
push str.STOP
push esi
mov dword [esp + 0x440], eax
call edi
push ebx
lea ecx, [esp + 0x43c]
push 0x104
push ecx
push 0x4db948
push str.FIRSTMSG
push esi
mov dword [esp + 0x44c], eax
call ebp
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x228]
push eax
push 1
lea ecx, [edx + 4]
mov edx, dword [edx + 0xc]
push edx
call fcn.0041dd10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x52c
ret 8