Function at 0x412aa0
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x65c
mov ebx, dword [ebp + 0xc]
cmp word [ebx], 0
je 0x412b00
movzx edx, word [ebx + 2]
cmp dx, 0x3a
jne 0x412ada
mov eax, ebx
jmp 0x412ac7
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x412ac3
sub eax, ebx
cmp eax, 4
je 0x412bf0
mov dword [esp], 0x3f3
call sym._WCMD_LoadMessage
mov dword [esp], eax
call dbg.WCMD_output_stderr
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x220]
mov dword [esp], 0x104
mov dword [esp + 4], edi
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
sub esp, 8
test eax, eax
je 0x412c90
lea eax, [ebp - 0x634]
lea esi, [ebp - 0x428]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetVolumeInformationW]
sub esp, 0x20
test eax, eax
je 0x412c90
movzx edx, word [ebp - 0x220]
cmp word [ebp - 0x428], 0
mov dword [ebp - 0x63c], edx
jne 0x412c60
mov dword [esp], 0x40d
call sym._WCMD_LoadMessage
mov edx, dword [ebp - 0x63c]
mov dword [esp], eax
mov dword [esp + 4], edx
call dbg.WCMD_output
mov dword [esp], 0x404
mov esi, dword [ebp - 0x634]
call sym._WCMD_LoadMessage
movzx edx, si
shr esi, 0x10
mov dword [esp + 4], esi
mov dword [esp + 8], edx
mov dword [esp], eax
call dbg.WCMD_output
mov esi, dword [ebp + 8]
test esi, esi
jne 0x412ca0
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x220]
mov dword [esp + 8], ebx
lea esi, [ebp - 0x428]
mov dword [esp + 4], 0x427992
mov dword [esp], edi
call sym._wsprintfW
lea eax, [ebp - 0x634]
mov dword [esp], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_GetVolumeInformationW]
sub esp, 0x20
jmp 0x412b6e
mov dword [esp], 0x40c
call sym._WCMD_LoadMessage
mov edx, dword [ebp - 0x63c]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], edx
call dbg.WCMD_output
jmp 0x412baf
call dbg.WCMD_print_error
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x405
lea esi, [ebp - 0x630]
call sym._WCMD_LoadMessage
mov dword [esp], eax
call dbg.WCMD_output
mov dword [esp], 0xfffffff6
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea edx, [ebp - 0x638]
sub esp, 4
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._WCMD_ReadFile
test eax, eax
je 0x412d20
mov eax, dword [ebp - 0x638]
cmp eax, 1
jbe 0x412d20
xor ecx, ecx
mov word [ebp + eax*2 - 0x632], cx
sub eax, 2
cmp word [ebp + eax*2 - 0x630], 0xd
jne 0x412d20
xor edx, edx
mov word [ebp + eax*2 - 0x630], dx
lea esi, [esi]
cmp word [ebx], 0
mov dword [esp + 4], esi
jne 0x412d50
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_SetVolumeLabelW]
sub esp, 8
test eax, eax
jne 0x412be2
call dbg.WCMD_print_error
jmp 0x412be2
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SetVolumeLabelW]
sub esp, 8
test eax, eax
jne 0x412be2
jmp 0x412d42