Function at 0x405350
Capabilities:
Get disk information
Query or enumerate registry value

Disassembly:
mov eax, 0x12b8
call fcn.004075f0
push esi
push edi
xor edi, edi
lea ecx, [esp + 0x38]
push edi
push str.Generals.dat
call fcn.00402530
push edi
lea ecx, [esp + 0x3c]
call fcn.00402660
test al, al
je 0x405722
mov eax, dword [0x4162f0]
push edi
push edi
push edi
push edi
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x1c], esi
je 0x405722
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push edx
lea ecx, [esp + 0x40]
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
call fcn.00402970
cmp dword [esp + 0x10], edi
je 0x405699
cmp dword [esp + 0x14], edi
jbe 0x405699
push ebx
lea eax, [esp + 0xc]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push eax
push 0x20019
push edi
push str.SoftwareElectronic_ArtsEA_GamesGenerals
push 0x80000002
mov byte [esp + 0xc4], 0
xor bl, bl
call ebp
cmp eax, edi
je 0x40541f
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push edi
push str.SoftwareElectronic_ArtsEA_GamesGenerals
push 0x80000001
call ebp
cmp eax, edi
mov bl, 1
jne 0x40558b
lea edx, [esp + 0x14]
lea eax, [esp + 0x130]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
push ecx
push edi
push str.InstallPath
push edx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push edi
push edi
lea eax, [esp + 0x40]
push edi
lea ecx, [esp + 0x13c]
push eax
push ecx
call fcn.0040731d
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
mov dx, word [0x4134a8]
mov dword [esp + 0x28], eax
repne scasb al, byte es:[edi]
push eax
push eax
lea eax, [esp + 0x64]
mov word [edi - 1], dx
lea ecx, [esp + 0x34]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
push 0
lea eax, [esp + 0x50]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x60]
push ecx
push str._lx_
push edx
call fcn.00406ff8
lea edi, [esp + 0x6c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0xb0]
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x14], 0x40
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov byte [esp + 0x70], al
and ecx, 3
test bl, bl
rep movsb byte es:[edi], byte [esi]
je 0x40550f
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push str.SoftwareElectronic_ArtsEA_GamesGeneralsergc
push 0x80000001
jmp 0x405525
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
push str.SoftwareElectronic_ArtsEA_GamesGeneralsergc
push 0x80000002
call ebp
test eax, eax
jne 0x40554c
lea edx, [esp + 0x14]
lea eax, [esp + 0x70]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
push ecx
push 0
push 0x4162c4
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edi, [esp + 0x70]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xb0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call ebp
test eax, eax
jne 0x40562f
lea ecx, [esp + 0x20]
mov byte [esp + 0x70], al
lea edx, [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x30]
push edx
push eax
push 0
push str.ProductID
push ecx
mov dword [esp + 0x38], 0x40
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edi, [esp + 0xb0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xb0]
repne scasb al, byte es:[edi]
mov ax, word [0x413434]
or ecx, 0xffffffff
mov word [edi - 1], ax
lea edi, [esp + 0x70]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
lea edi, [esp + 0xb0]
or ecx, 0xffffffff
xor eax, eax
pop ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x230], 0
cmp ecx, 0x38
pop ebx
jle 0x405654
mov ecx, 0x38
lea eax, [esp + 0xa8]
push ecx
push eax
lea ecx, [esp + 0x234]
call fcn.00402e20
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push esi
push ecx
push edx
lea ecx, [esp + 0x238]
call fcn.00402f80
mov eax, dword [esp + 0x10]
push eax
call fcn.0040757e
add esp, 4
lea ecx, [esp + 0x22c]
call fcn.00402e10
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [str.6096561D_8A70_48ed_9FF8_18552419E50D]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
test esi, esi
je 0x405722
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x405722
mov edx, dword [esp + 0x12c4]
push 0x493e0
lea eax, [esp + 0x2c]
push 0
push eax
push 2
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x40570c
mov eax, dword [0x4162f0]
test eax, eax
je 0x40570c
mov ecx, dword [esp + 0x12c8]
push eax
push 0
push 0xbeef
push ecx
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x413354]
test eax, eax
jne 0x405722
call dword [0x41335c]
lea ecx, [esp + 0x38]
call fcn.004025c0
pop edi
pop esi
add esp, 0x12b8
ret