Function at 0x408ab0
Capabilities:
Get disk information
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52d8d9
mov eax, dword fs:[0]
push eax
sub esp, 0x38c
mov eax, dword [0x58e188]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x31c], edi
mov dword [ebp - 0x32c], esi
call fcn.0041b722
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x408b0c
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x320], ebx
mov ecx, dword [0x58f984]
mov eax, dword [ecx - 0xc]
dec eax
push eax
mov esi, 1
push edi
mov ecx, 0x58f984
mov dword [ebp - 4], esi
call fcn.004067f0
mov eax, dword [0x58f9ac]
push ecx
mov dword [ebp - 0x32c], esi
add eax, 0xfffffff0
mov dword [ebp - 0x324], esp
mov esi, esp
push eax
call fcn.00402000
add eax, 0x10
mov dword [esi], eax
mov ecx, esp
mov dword [ebp - 0x318], esp
push str.Subst
mov byte [ebp - 4], 2
call fcn.00402730
push ecx
mov ecx, esp
mov dword [ebp - 0x398], esp
push 0x53ec40
mov byte [ebp - 4], 3
call fcn.00402730
lea edx, [ebp - 0x328]
push edx
mov byte [ebp - 4], 1
call fcn.004060e0
add esp, 0x10
mov eax, dword [ebp - 0x328]
mov byte [ebp - 4], 4
mov ecx, str.true
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408bd6
test dx, dx
je 0x408bd2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408bd6
add eax, 4
add ecx, 4
test dx, dx
jne 0x408bb0
xor eax, eax
jmp 0x408bdb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
jne 0x408c00
lea eax, [ebp - 0x328]
push str.TRUE
push eax
call fcn.00405e40
add esp, 8
test al, al
je 0x408f9f
cmp dword [0x58f9dc], 0
je 0x408f9f
call fcn.0041b722
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408c27
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x324], eax
mov ecx, dword [edi]
push ecx
lea edx, [ebp - 0x324]
push 0x53f130
push edx
mov byte [ebp - 4], 5
call fcn.00402570
add esp, 0xc
lea eax, [ebp - 0x314]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov ax, word [ebp - 0x314]
mov dword [ebp - 0x394], 0x53f12c
mov dword [ebp - 0x390], 0x53f128
mov dword [ebp - 0x38c], 0x53f124
mov dword [ebp - 0x388], 0x53f120
mov dword [ebp - 0x384], 0x53f11c
mov dword [ebp - 0x380], 0x53f118
mov dword [ebp - 0x37c], 0x53f114
mov dword [ebp - 0x378], 0x53f110
mov dword [ebp - 0x374], 0x53f10c
mov dword [ebp - 0x370], 0x53f108
mov dword [ebp - 0x36c], 0x53f104
mov dword [ebp - 0x368], 0x53f100
mov dword [ebp - 0x364], 0x53f0fc
mov dword [ebp - 0x360], 0x53f0f8
mov dword [ebp - 0x35c], 0x53f0f4
mov dword [ebp - 0x358], 0x53f0f0
mov dword [ebp - 0x354], 0x53f0ec
mov dword [ebp - 0x350], 0x53f0e8
mov dword [ebp - 0x34c], 0x53f0e4
mov dword [ebp - 0x348], 0x53f0e0
mov dword [ebp - 0x344], 0x53f0dc
mov dword [ebp - 0x340], 0x53f0d8
mov dword [ebp - 0x33c], 0x53f0d4
mov dword [ebp - 0x338], 0x53f0d0
mov dword [ebp - 0x334], 0x53f0cc
mov dword [ebp - 0x330], str.ZYXWVUTSRQPONMLKJIHGFEDCBA
mov dword [ebp - 0x318], 0x41
lea ebx, [ebp - 0x314]
test ax, ax
je 0x408deb
movzx eax, ax
lea esp, [esp]
movzx edx, ax
cmp edx, 0x59
jg 0x408dc1
mov eax, edx
sub eax, dword [ebp - 0x318]
mov ecx, 0x5a
add eax, eax
add eax, eax
lea edi, [ebp + eax - 0x394]
lea esi, [ebp + eax - 0x390]
sub ecx, edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x31c]
inc dword [ebp - 0x318]
mov eax, ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408dd0
sub eax, edx
sar eax, 1
lea ebx, [ebx + eax*2 + 2]
movzx eax, word [ebx]
test ax, ax
jne 0x408d90
mov ecx, dword [ebp - 0x38c]
movsx edx, byte [ecx]
push edx
lea eax, [ebp - 0x320]
push str._C:_
push eax
call fcn.00402570
mov ebx, dword [ebp - 0x320]
mov esi, dword [edi]
lea eax, [ebx - 0x10]
sub esi, 0x10
add esp, 0xc
cmp eax, esi
je 0x408e78
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x408e62
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x408e62
push eax
call fcn.00402000
add esp, 4
mov dword [ebp - 0x318], eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x408e4f
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [ebp - 0x318]
mov ecx, dword [ebp - 0x31c]
add eax, 0x10
mov dword [ecx], eax
jmp 0x408e72
mov eax, dword [ebx - 0xc]
mov ecx, dword [ebp - 0x31c]
push eax
push ebx
call fcn.00402320
mov edi, dword [ebp - 0x31c]
mov eax, dword [ebx - 0xc]
mov esi, 1
cmp eax, 3
jge 0x408e8c
lea esi, [eax - 2]
test esi, esi
jle 0x408f04
mov edi, eax
sub eax, esi
dec eax
sub edi, esi
cmp dword [ebx - 4], 1
mov dword [ebp - 0x318], eax
jle 0x408eb4
mov edx, dword [ebx - 0xc]
push edx
lea ecx, [ebp - 0x320]
call fcn.00401d00
mov ebx, dword [ebp - 0x320]
mov eax, dword [ebp - 0x318]
add eax, eax
push eax
lea ecx, [ebx + esi*2 + 4]
push ecx
push eax
lea edx, [ebx + 4]
push edx
call fcn.0051504a
add esp, 0x10
cmp eax, 0x50
ja case.0x408edb.1
movzx eax, byte [eax + 0x409024]
jmp dword [eax*4 + 0x409014]
call fcn.004151a9
call fcn.004151e1
test edi, edi
js 0x408f43
cmp edi, dword [ebx - 8]
jg 0x408f43
mov dword [ebx - 0xc], edi
xor ecx, ecx
mov word [ebx + edi*2], cx
mov edi, dword [ebp - 0x31c]
mov esi, dword [ebp - 0x324]
push esi
push ebx
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
test eax, eax
jne 0x408f4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push esi
lea edx, [ebp - 0x114]
push str.DefineDosDevice__s_____s_err:__d
push edx
call fcn.00402df0
lea eax, [ebp - 0x114]
push eax
call fcn.0040d9d0
add esp, 0x18
jmp 0x408f7d
push 0x80070057
call fcn.00401040
push ebx
push esi
lea ecx, [ebp - 0x114]
push str.DefineDosDevice__s_____s
push ecx
call fcn.00402df0
lea edx, [ebp - 0x114]
push edx
call fcn.0040d9d0
mov eax, dword [edi]
add esp, 0x14
push eax
push str.GamePath
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408fad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x408fad
mov eax, dword [edi]
push eax
push str.GamePath
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [ebp - 0x328]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408fd3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408ff3
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00514c0e
mov esp, ebp
pop ebp
ret