Function at 0x4e1820
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x63e758]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x2c], 0
push ebx
mov ebx, dword [ebp + 0xc]
test eax, eax
je 0x4e1d1b
test ebx, ebx
je 0x4e1d1b
mov edx, dword [ebx + 0x1c]
push edi
mov edi, dword [ebx + 0x24]
mov eax, dword [edx + 8]
sub eax, dword [edx + 4]
add eax, dword [edx]
cmp eax, 4
jae 0x4e187a
pop edi
mov eax, 0xd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
mov ecx, dword [edx + 4]
push esi
movzx esi, byte [ecx + 3]
movzx eax, byte [ecx + 2]
shl esi, 8
add esi, eax
movzx eax, byte [ecx + 1]
shl esi, 8
add esi, eax
movzx eax, byte [ecx]
add dword [edx + 4], 4
shl esi, 8
add esi, eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x3c]
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
dec esi
cmp esi, 6
ja case.0x4e18c6.2
jmp dword [esi*4 + 0x4e1d30]
push 0
lea eax, [ebp - 0x2c]
push eax
push 0xffffffffffffffff
push str.FREERDP
push 0
push dword [0x656110]
call fcn.00430810
add eax, eax
add esp, 0x18
mov dword [ebp - 0x34], eax
test eax, eax
jg 0x4e192c
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4e1cac
push str.ConvertToUnicode_failed_
push str.drive_process_irp_query_volume_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_main.c
push 0x1dd
jmp 0x4e1c92
lea esi, [eax + 0x11]
push esi
push edi
call fcn.004cf590
push esi
push edi
call fcn.004387b0
add esp, 0x10
test eax, eax
jne 0x4e199e
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4e198e
push str.Stream_EnsureRemainingCapacity_failed_
push str.drive_process_irp_query_volume_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_main.c
push 0x1e5
push 4
push 0
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x1c
push dword [ebp - 0x2c]
call fcn.00580204
add esp, 4
jmp 0x4e1cac
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x3c]
push 0
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
push dword [ebp - 0x24]
push edi
call fcn.004cf590
push dword [ebp - 0x20]
push edi
call fcn.004cf590
movzx eax, word [ebp - 0x30]
push eax
push edi
call fcn.004cf590
mov esi, dword [ebp - 0x34]
push esi
push edi
call fcn.004cf590
mov eax, dword [edi + 4]
push esi
mov byte [eax], 0
inc dword [edi + 4]
push dword [ebp - 0x2c]
push edi
call fcn.004e2830
push dword [ebp - 0x2c]
call fcn.00580204
mov eax, dword [ebx + 0x28]
add esp, 0x30
push ebx
call eax
add esp, 4
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
push 0x18
push edi
call fcn.004cf590
push 0x18
push edi
call fcn.004387b0
add esp, 0x10
test eax, eax
jne 0x4e1a5f
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4e1cac
push str.Stream_EnsureRemainingCapacity_failed_
push str.drive_process_irp_query_volume_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_main.c
push 0x1fb
jmp 0x4e1c92
push 0
push dword [ebp - 0x38]
push edi
call fcn.004e0a50
push 0
push dword [ebp - 0x30]
push edi
call fcn.004e0a50
push dword [ebp - 0x44]
push edi
call fcn.004cf590
push dword [ebp - 0x40]
push edi
call fcn.004cf590
mov eax, dword [ebx + 0x28]
add esp, 0x28
push ebx
call eax
add esp, 4
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x2c]
push eax
push 0xffffffffffffffff
push str.FAT32
push 0
push dword [0x656110]
call fcn.00430810
add eax, eax
add esp, 0x18
mov dword [ebp - 0x34], eax
test eax, eax
jg 0x4e1b03
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4e1cac
push str.ConvertToUnicode_failed_
push str.drive_process_irp_query_volume_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_main.c
push 0x20a
jmp 0x4e1c92
lea esi, [eax + 0xc]
push esi
push edi
call fcn.004cf590
push esi
push edi
call fcn.004387b0
add esp, 0x10
test eax, eax
jne 0x4e1b5f
push dword [ebp - 0x2c]
call fcn.00580204
add esp, 4
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4e1cac
push str.Stream_EnsureRemainingCapacity_failed_
push str.drive_process_irp_query_volume_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_main.c
push 0x213
jmp 0x4e1c92
push 7
push edi
call fcn.004cf590
push 0x104
push edi
call fcn.004cf590
mov esi, dword [ebp - 0x34]
push esi
push edi
call fcn.004cf590
push esi
push dword [ebp - 0x2c]
push edi
call fcn.004e2830
push dword [ebp - 0x2c]
call fcn.00580204
mov eax, dword [ebx + 0x28]
add esp, 0x28
push ebx
call eax
add esp, 4
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
push 0x20
push edi
call fcn.004cf590
push 0x20
push edi
call fcn.004387b0
add esp, 0x10
test eax, eax
jne 0x4e1bfb
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4e1cac
push str.Stream_EnsureRemainingCapacity_failed_
push str.drive_process_irp_query_volume_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_main.c
push 0x227
jmp 0x4e1c92
push 0
push dword [ebp - 0x38]
push edi
call fcn.004e0a50
push 0
push dword [ebp - 0x30]
push edi
call fcn.004e0a50
push 0
push dword [ebp - 0x30]
push edi
call fcn.004e0a50
push dword [ebp - 0x44]
push edi
call fcn.004cf590
push dword [ebp - 0x40]
push edi
call fcn.004cf590
mov eax, dword [ebx + 0x28]
add esp, 0x34
push ebx
call eax
add esp, 4
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
push 8
push edi
call fcn.004cf590
push 8
push edi
call fcn.004387b0
add esp, 0x10
test eax, eax
jne 0x4e1cc2
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4e1cac
push str.Stream_EnsureRemainingCapacity_failed_
push str.drive_process_irp_query_volume_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_main.c
push 0x238
push 4
push 0
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x1c
pop esi
pop edi
mov eax, 0xc
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
push 7
push edi
call fcn.004cf590
push 0
push edi
call fcn.004cf590
mov eax, dword [ebx + 0x28]
add esp, 0x10
push ebx
call eax
add esp, 4
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
push 0
push edi
mov dword [ebx + 0x20], 0xc0000001
call fcn.004cf590
mov eax, dword [ebx + 0x28]
add esp, 8
push ebx
call eax
add esp, 4
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x57
xor ecx, ebp
pop ebx
call fcn.005802ce
mov esp, ebp
pop ebp
ret