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

Disassembly:
mov eax, 0x12b8
call fcn.004078b0
push esi
push edi
xor edi, edi
lea ecx, [esp + 0x38]
push edi
push str.Generals.dat
call fcn.004025c0
push edi
lea ecx, [esp + 0x3c]
call fcn.004026f0
test al, al
je 0x405a6d
mov eax, dword [0x41431c]
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 + 0x20], esi
je 0x405a6d
lea ecx, [esp + 0x10]
lea edx, [esp + 0xc]
push ecx
push edx
lea ecx, [esp + 0x40]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
call fcn.00402a00
cmp dword [esp + 0xc], edi
je 0x4059e4
cmp dword [esp + 0x10], edi
jbe 0x4059e4
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_GamesCommand_and_Conquer_Generals_Zero_Hour
push 0x80000002
mov byte [esp + 0xc4], 0
xor bl, bl
call ebp
cmp eax, edi
je 0x40573f
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push edi
push str.SoftwareElectronic_ArtsEA_GamesCommand_and_Conquer_Generals_Zero_Hour
push 0x80000001
call ebp
cmp eax, edi
mov bl, 1
jne 0x4058bf
lea edx, [esp + 0x20]
lea eax, [esp + 0x130]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push ecx
push edi
push str.InstallPath
push edx
mov dword [esp + 0x38], 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.0040761f
mov edi, 0x4134c8
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x38]
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
push eax
and ecx, 3
mov dword [esp + 0x28], eax
rep movsb byte es:[edi], byte [esi]
push eax
lea eax, [esp + 0x64]
lea ecx, [esp + 0x34]
push eax
lea edx, [esp + 0x30]
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 + 0x24]
lea edx, [esp + 0x60]
push ecx
push str._lx_
push edx
call fcn.004072fa
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 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
mov byte [esp + 0x70], al
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test bl, bl
mov dword [esp + 0x20], 0x40
je 0x405843
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push str.SoftwareElectronic_ArtsEA_GamesCommand_and_Conquer_Generals_Zero_Hourergc
push 0x80000001
jmp 0x405859
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
push str.SoftwareElectronic_ArtsEA_GamesCommand_and_Conquer_Generals_Zero_Hourergc
push 0x80000002
call ebp
test eax, eax
jne 0x405880
lea edx, [esp + 0x20]
lea eax, [esp + 0x70]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push eax
push ecx
push 0
push 0x4142f0
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 + 0x28]
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call ebp
test eax, eax
jne 0x40597a
lea ecx, [esp + 0x1c]
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 + 0x34], 0x40
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 0x413434
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
lea edx, [esp + 0xb0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x70]
or ecx, 0xffffffff
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 + 0x28]
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 0x40599f
mov ecx, 0x38
lea eax, [esp + 0xa8]
push ecx
push eax
lea ecx, [esp + 0x234]
call fcn.00402eb0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push esi
push ecx
push edx
lea ecx, [esp + 0x238]
call fcn.00403010
mov eax, dword [esp + 0xc]
push eax
call fcn.0040787e
add esp, 4
lea ecx, [esp + 0x22c]
call fcn.00402ea0
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 0x405a6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x405a6d
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 0x405a57
mov eax, dword [0x41431c]
test eax, eax
je 0x405a57
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 0x405a6d
call dword [0x41335c]
lea ecx, [esp + 0x38]
call fcn.00402650
pop edi
pop esi
add esp, 0x12b8
ret