Function at 0x478055
Capabilities:
Enumerate files on windows
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x494
mov edx, dword [ebp + 8]
xor eax, eax
push ebx
mov word [esp + 8], ax
xor bl, bl
mov word [esp + 0x18], ax
movzx eax, word [edx]
mov byte [esp + 0x28], bl
push esi
push edi
cmp eax, 8
jne 0x478095
mov edi, dword [edx + 8]
mov dword [esp + 0xc], edi
mov dword [esp + 0x31], 0
jmp 0x478290
mov ecx, 0x4008
cmp ax, cx
jne 0x4780b5
mov eax, dword [edx + 8]
mov edi, dword [eax]
mov dword [esp + 0xc], edi
mov dword [esp + 0x31], 0
jmp 0x478290
xor edi, edi
mov dword [esp + 0xc], edi
cmp eax, 0xa
jne 0x47817e
cmp dword [edx + 8], 0x80020004
jne 0x47817e
mov bl, 1
mov dword [esp + 0x31], 0x80020005
mov byte [esp + 0x30], bl
xor esi, esi
test bl, bl
jne 0x47834f
cmp dword [ebp + 0xc], 8
jne 0x47834f
mov eax, dword [0x49f578]
cmp eax, 0xffffffff
je 0x478112
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0xc]
mov dword [0x49f578], 0xffffffff
push 0x208
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00496311
add esp, 0xc
lea eax, [esp + 0x298]
push 0x208
push 0
push eax
call fcn.00496311
add esp, 0xc
test esi, esi
jne 0x4782a7
push esi
push esi
push esi
push esi
push esi
push 0x104
lea eax, [esp + 0x2b0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x4783b4
lea eax, [esp + 0x298]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
jmp 0x47853b
cmp eax, 9
je 0x478193
mov esi, 0x4009
mov ecx, eax
cmp ax, si
jne 0x47822a
mov ecx, dword [edx + 8]
test eax, 0x4000
je 0x47819f
mov ecx, dword [ecx]
test ecx, ecx
je 0x478532
push 0
push 0
lea edx, [esp + 0x18]
xor eax, eax
push edx
lea edx, [esp + 0x44]
mov dword [esp + 0x44], eax
push edx
push 3
push 0
push 0x4cd4e0
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x18]
mov esi, eax
mov dword [esp + 0x31], esi
test esi, esi
js 0x47827c
movzx ecx, word [esp + 0x10]
lea edx, [esp + 0x10]
mov esi, 0x4008
mov eax, ecx
cmp cx, si
jne 0x47820d
mov eax, dword [esp + 0x18]
xor esi, esi
mov edi, dword [eax]
mov dword [esp + 0xc], edi
mov dword [esp + 0x31], esi
jmp 0x478280
cmp eax, 8
jne 0x478222
mov edi, dword [esp + 0x18]
xor esi, esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x31], esi
jmp 0x478280
mov bl, byte [esp + 0x30]
mov edi, dword [esp + 0xc]
cmp cx, 1
jne 0x47823b
mov esi, 0x800a005e
mov dword [esp + 0x31], esi
jmp 0x478284
mov eax, 0x400c
cmp cx, ax
jne 0x47824d
mov edx, dword [edx + 8]
cmp word [edx], ax
je 0x478245
push 8
push 2
push 0x400
push edx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayPtrOfIndex]
mov esi, eax
mov dword [esp + 0x31], esi
test esi, esi
js 0x47827c
mov edi, dword [esp + 0x28]
xor esi, esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x31], esi
jmp 0x478280
mov edi, dword [esp + 0xc]
mov bl, byte [esp + 0x30]
test bl, bl
jne 0x478290
test esi, esi
js 0x47853b
test edi, edi
je 0x4780df
mov eax, dword [edi - 4]
cdq
sub eax, edx
mov esi, eax
sar esi, 1
jmp 0x4780e1
mov dword [esp + 0x38], 0
test edi, edi
je 0x4782bd
mov eax, dword [edi - 4]
cdq
sub eax, edx
sar eax, 1
jmp 0x4782bf
xor eax, eax
lea ecx, [esp + 0x38]
mov edx, eax
push ecx
mov ecx, edi
call fcn.00477f5d
mov edi, dword [esp + 0x38]
mov esi, eax
test esi, esi
js 0x47848f
push 0x104
lea eax, [esp + 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
test eax, eax
je 0x478475
push 0
push 0
push 0
push 0
push 0
push 0x104
lea eax, [esp + 0x2b0]
push eax
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x478475
lea eax, [esp + 0x298]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
test edi, edi
je 0x47852e
push edi
push 0
push dword [0x4a01c8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
jmp 0x47853b
push 0x250
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00496311
mov eax, dword [0x49f578]
add esp, 0xc
test bl, bl
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileW]
je 0x4783be
cmp eax, 0xffffffff
je 0x4783b4
lea ecx, [esp + 0x48]
push ecx
push eax
call ebx
test eax, eax
jne 0x4784c5
push dword [0x49f578]
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x4d2168
mov dword [0x49f578], 0xffffffff
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov dword [ecx], eax
jmp 0x47853b
mov esi, 0x80004005
jmp 0x47853b
cmp eax, 0xffffffff
je 0x4783d8
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0xc]
mov dword [0x49f578], 0xffffffff
test esi, esi
je 0x4783f4
movzx eax, word [edi + esi*2 - 2]
cmp eax, 0x5c
je 0x4783f4
cmp eax, 0x3a
je 0x4783f4
cmp eax, 0x2f
je 0x4783f4
test eax, eax
jne 0x47841c
push 0x4d1814
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, eax
lea eax, [esp + 0xc]
push eax
push esi
push dword [esp + 0x14]
call dword [sym.imp.OLEAUT32.dll_VarBstrCmp]
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov edi, dword [esp + 0xc]
mov eax, dword [ebp + 0xc]
mov dword [0x49f570], eax
mov dword [esp + 0x38], 0
test edi, edi
je 0x47843a
mov eax, dword [edi - 4]
cdq
sub eax, edx
sar eax, 1
jmp 0x47843c
xor eax, eax
lea ecx, [esp + 0x38]
mov edx, eax
push ecx
mov ecx, edi
call fcn.00477f5d
mov edi, dword [esp + 0x38]
mov esi, eax
test esi, esi
js 0x47848f
lea eax, [esp + 0x48]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [0x49f578], eax
cmp eax, 0xffffffff
jne 0x4784ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xc
jbe 0x47847c
mov esi, 0x80004005
jmp 0x47848f
mov eax, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push 0x4d2168
call eax
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov dword [ecx], eax
test edi, edi
je 0x47853b
push edi
push 0
push dword [0x4a01c8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x47853b
test edi, edi
je 0x4784c5
push edi
push 0
push dword [0x4a01c8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea esp, [esp]
mov ecx, dword [esp + 0x48]
cmp ecx, 0x80
je 0x47851d
mov eax, dword [0x49f570]
not eax
and eax, ecx
test eax, 0x16
je 0x47851d
lea eax, [esp + 0x48]
push eax
push dword [0x49f578]
call ebx
test eax, eax
jne 0x4784c5
push dword [0x49f578]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push 0x4d2168
mov dword [0x49f578], 0xffffffff
call eax
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov dword [ecx], eax
jmp 0x47853b
lea eax, [esp + 0x74]
push eax
mov eax, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
call eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor esi, esi
jmp 0x47853b
mov esi, 0x800a005b
mov dword [esp + 0x31], esi
cmp word [esp + 0x10], 0
mov edi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
je 0x478550
lea eax, [esp + 0x10]
push eax
call edi
cmp word [esp + 0x20], 0
je 0x47855f
lea eax, [esp + 0x20]
push eax
call edi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc