Function at 0x403940
Capabilities:
Get disk information

Disassembly:
sub esp, 0x430
mov eax, dword [0x40d204]
mov dword [esp + 0x42c], eax
call fcn.00403760
test eax, eax
jne 0x403973
mov eax, dword [0x40dfe4]
mov ecx, dword [esp + 0x42c]
call fcn.00403e52
add esp, 0x430
ret
push ebx
mov ebx, dword [esp + 0x43c]
test ebx, ebx
je 0x403c4f
mov al, byte [ebx]
test al, al
je 0x403c4f
movsx eax, al
push eax
call fcn.0040431d
add esp, 4
test eax, eax
je 0x403c4f
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4039a6
sub eax, edx
cmp eax, 0x104
ja 0x403c4f
push esi
lea ecx, [esp + 0x38]
push ecx
push 0x1f4
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
mov dl, byte [ebx]
lea eax, [esp + 8]
push eax
lea esi, [esp + 0x3c]
mov byte [esp + 0xc], dl
mov byte [esp + 0xd], 0
call fcn.004090cf
mov al, byte [esp + 0x3c]
add esp, 4
test al, al
je 0x403a2c
nop
push esi
call fcn.004090cf
mov cl, byte [esi]
mov al, byte [esp + 0xc]
add esp, 4
cmp cl, al
je 0x403a27
mov al, byte [esi + 4]
add esi, 4
test al, al
jne 0x4039f0
pop esi
mov eax, 4
pop ebx
mov ecx, dword [esp + 0x42c]
call fcn.00403e52
add esp, 0x430
ret
cmp byte [esi], 0
jne 0x403a46
pop esi
mov eax, 4
pop ebx
mov ecx, dword [esp + 0x42c]
call fcn.00403e52
add esp, 0x430
ret
push ebp
mov ebp, dword [esp + 0x448]
test ebp, ebp
je 0x403c34
cmp byte [ebp], 0
je 0x403c34
mov eax, ebp
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403a65
sub eax, edx
cmp eax, 5
ja 0x403c34
push 0x40a364
push ebp
call fcn.0040908c
add esp, 8
test eax, eax
je 0x403ab1
push str.fat32
push ebp
call fcn.0040908c
add esp, 8
test eax, eax
je 0x403ab1
push str.ntfs
push ebp
call fcn.0040908c
add esp, 8
test eax, eax
jne 0x403c34
push edi
mov edi, dword [esp + 0x450]
test edi, edi
je 0x403aec
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403ac2
sub eax, edx
cmp eax, 0xb
jbe 0x403aec
pop edi
pop ebp
pop esi
mov eax, 6
pop ebx
mov ecx, dword [esp + 0x42c]
call fcn.00403e52
add esp, 0x430
ret
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x104
lea edx, [esp + 0x238]
push edx
push 0xffffffffffffffff
push ebx
push 0
push 0
call esi
mov ax, word [esp + 0x234]
push 5
lea ecx, [esp + 0x20]
push ecx
push 0xffffffffffffffff
push ebp
push 0
push 0
mov word [esp + 0x2c], ax
mov word [esp + 0x2e], 0x3a
mov word [esp + 0x30], 0x5c
mov word [esp + 0x32], 0
call esi
xor ebp, ebp
cmp edi, ebp
jne 0x403b46
mov dword [esp + 0x28], ebp
jmp 0x403b54
push 0xc
lea edx, [esp + 0x2c]
push edx
push 0xffffffffffffffff
push edi
push ebp
push ebp
call esi
push 0x40dfc0
mov dword [0x40dfe0], 0xc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x444]
push ebx
mov dword [0x40dfe8], eax
call fcn.004038c0
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
jne 0x403b8f
mov dword [0x40dfe0], 8
cmp dword [esp + 0x458], ebp
jne 0x403be2
push esi
call fcn.00403860
add esp, 4
test eax, eax
jne 0x403be2
mov dword [0x40dfe0], 9
cmp esi, 0xffffffff
je 0x403bbb
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x40dfc0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x40dfe0]
pop edi
pop ebp
pop esi
pop ebx
mov ecx, dword [esp + 0x42c]
call fcn.00403e52
add esp, 0x430
ret
push esi
call fcn.00403890
add esp, 4
test eax, eax
jne 0x403c01
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40dfe0], 7
jmp 0x403baf
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x454]
push 0x4037e0
push ebp
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x2c]
push eax
push ebp
lea ecx, [esp + 0x2c]
push ecx
mov dword [0x40dfbc], ebp
call dword [0x40dfd8]
jmp 0x403bbb
pop ebp
pop esi
mov eax, 5
pop ebx
mov ecx, dword [esp + 0x42c]
call fcn.00403e52
add esp, 0x430
ret
mov ecx, dword [esp + 0x430]
mov eax, 3
pop ebx
call fcn.00403e52
add esp, 0x430
ret