Function at 0x10001850
Capabilities:
Get disk information
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x628
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x620]
mov esi, ecx
push eax
xor edi, edi
push esi
mov dword [ebp - 0x620], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x10001899
cmp dword [ebp - 0x620], edi
jne 0x10001899
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10006570
mov esp, ebp
pop ebp
ret
push ebx
push 0xffff
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x10001a8a
push 0
push 1
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x628], eax
test eax, eax
je 0x10001a78
push 1
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov dword [ebp - 0x624], esi
test esi, esi
je 0x10001a67
push 0x7fff
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetMappedFileNameW]
test eax, eax
je 0x10001a5b
lea edx, [ebp - 0x614]
push edx
xor ecx, ecx
push 0x1ff
mov word [ebp - 0x614], cx
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
je 0x10001a5b
mov eax, dword [0x10010b14]
mov cx, word [0x10010b18]
mov dword [ebp - 0x61c], edi
lea edi, [ebp - 0x614]
mov dword [ebp - 0xc], eax
mov word [ebp - 8], cx
mov dword [ebp - 0x618], edi
lea esp, [esp]
mov dx, word [edi]
push 0x104
lea eax, [ebp - 0x214]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov word [ebp - 0xc], dx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x10001a32
lea eax, [ebp - 0x214]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10001990
sub eax, edx
sar eax, 1
mov esi, eax
cmp esi, 0x104
jae 0x10001a32
push esi
lea edx, [ebp - 0x214]
push edx
push ebx
call fcn.10006aee
add esp, 0xc
test eax, eax
jne 0x10001aa3
cmp word [ebx + esi*2], 0x5c
lea edi, [ebx + esi*2]
jne 0x10001a9d
push 0xffff
push eax
mov dword [ebp - 0x61c], 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x10001a78
push edi
lea eax, [ebp - 0xc]
push eax
push str._s_s
push 0xffff
push esi
call fcn.10001790
add esp, 0x14
mov edx, esi
mov ecx, ebx
call fcn.10001800
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 0x618]
mov cx, word [edi]
add edi, 2
test cx, cx
jne 0x10001a32
cmp dword [ebp - 0x61c], 0
mov dword [ebp - 0x618], edi
jne 0x10001a55
cmp word [edi], cx
jne 0x10001960
mov esi, dword [ebp - 0x624]
push esi
mov edi, 1
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 0x628]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x10001a8a
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
mov ecx, dword [ebp - 4]
mov eax, ebx
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.10006570
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x618]
mov dword [ebp - 0x61c], 0
jmp 0x10001a32