Function at 0x4b78c0
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c4
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov dword [esp + 0x14], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
test eax, eax
jne 0x4b78fe
lea edx, [esp + 0xc0]
call fcn.004b76d0
test eax, eax
jne 0x4b7b53
lea ecx, [esp + 0xc0]
mov dword [esp + 0x20], ecx
call fcn.004b7600
mov edx, eax
mov dword [esp + 0x1c], edx
test edx, edx
jne 0x4b7917
lea eax, [edx + 7]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
mov ecx, 0xc0000000
mov eax, ebx
and eax, 2
mov dword [esp + 0x10], eax
mov eax, connect
cmove ecx, eax
mov dword [esp + 0x24], ecx
test bl, 0x10
je 0x4b7940
mov esi, 1
jmp 0x4b7954
test bl, 4
mov eax, 0
setne al
add eax, 3
mov dword [esp + 0x18], eax
mov esi, eax
test bl, 8
mov eax, 0x4000102
mov ebx, 0x80
cmove eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [esp + 0x14], eax
mov eax, dword [0x565224]
mov dword [esp + 0x18], ebx
mov ebx, dword [ebp + 0x14]
test eax, eax
jne 0x4b79a7
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x94
push eax
call dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
xor eax, eax
cmp dword [esp + 0x38], 2
mov edx, dword [esp + 0x1c]
sete al
inc eax
mov dword [0x565224], eax
push 0
push dword [esp + 0x18]
push esi
push 0
push 3
push ecx
push edx
cmp eax, 2
jne 0x4b79c1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4b79c7
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, eax
cmp edx, 0xffffffff
jne 0x4b7a0d
push dword [esp + 0x1c]
call fcn.005131f4
add esp, 4
cmp dword [esp + 0x10], 0
je 0x4b7a01
push dword [ebp + 0x18]
and ebx, 0xfffffffd
or ebx, 1
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004b78c0
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x4b7a20
xor eax, eax
cmp dword [esp + 0x10], eax
setne al
inc eax
mov dword [ecx], eax
lea eax, [esp + 0x1c8]
mov dword [edi + 8], 0
push eax
push 0x104
push dword [esp + 0x28]
mov dword [edi + 0x10], 0
push dword [ebp + 8]
mov dword [edi], 0x54a1d4
mov dword [edi + 4], edx
mov dword [edi + 0xc], 0
mov dword [esp + 0x24], 0x200
call fcn.004b7d10
add esp, 0x10
test eax, eax
jne 0x4b7b3e
lea ecx, [esp + 0x1c8]
call fcn.004b7600
mov esi, eax
test esi, esi
je 0x4b7b37
mov ecx, dword [0x565224]
test ecx, ecx
jne 0x4b7aac
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x94
push eax
call dword [esp + 0x1c]
xor ecx, ecx
cmp dword [esp + 0x38], 2
sete cl
inc ecx
mov dword [0x565224], ecx
cmp ecx, 2
mov ecx, esi
jne 0x4b7af4
movzx eax, word [esi]
test ax, ax
je 0x4b7adb
mov edx, eax
nop dword [eax]
cmp dx, 0x5c
je 0x4b7ad6
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x4b7ac0
jmp 0x4b7adb
xor eax, eax
mov word [ecx], ax
lea eax, [esp + 0x10]
push eax
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
jmp 0x4b7b28
mov al, byte [esi]
test al, al
je 0x4b7b11
nop word [eax + eax]
cmp al, 0x5c
je 0x4b7b0e
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4b7b00
jmp 0x4b7b11
mov byte [ecx], 0
lea eax, [esp + 0x10]
push eax
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
push esi
mov ebx, eax
call fcn.005131f4
add esp, 4
test ebx, ebx
jne 0x4b7b3e
mov eax, 0x200
jmp 0x4b7b42
mov eax, dword [esp + 0x14]
push dword [esp + 0x1c]
mov dword [edi + 0x10], eax
call fcn.005131f4
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret