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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2644
call fcn.101f99e0
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov eax, edi
mov dword [ebp - 0x2638], esi
mov dword [ebp - 0x263c], edi
cmp dword [edi + 0x14], 8
jb 0x1002be46
mov eax, dword [edi]
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2630], eax
cmp eax, 0xffffffff
je 0x1002be95
lea ecx, [ebp - 0x2634]
xor ebx, ebx
push ecx
push eax
mov dword [ebp - 0x2634], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x1002beb0
cmp dword [ebp - 0x2634], ebx
jne 0x1002beb0
push dword [ebp - 0x2630]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov ecx, esi
call fcn.10005170
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101f99c6
mov esp, ebp
pop ebp
ret
push 0
push 1
push 0
push 2
push 0
push dword [ebp - 0x2630]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x2644], eax
test eax, eax
je 0x1002c0c1
push 1
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x2640], eax
test eax, eax
je 0x1002c0b5
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.PSAPI.DLL_GetMappedFileNameW
test eax, eax
je 0x1002c0a9
xor eax, eax
mov word [ebp - 0x2628], ax
lea eax, [ebp - 0x2628]
push eax
push 0xfff
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
je 0x1002c0a9
mov eax, dword [0x10205350]
lea edi, [ebp - 0x2628]
movzx ecx, word [ebp - 0x2628]
mov dword [ebp - 0xc], eax
mov ax, word [0x10205354]
mov word [ebp - 8], ax
mov dword [ebp - 0x262c], ebx
lea ebx, [ebx]
push 0x104
lea eax, [ebp - 0x420]
mov word [ebp - 0xc], cx
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x1002c074
lea esi, [ebp - 0x420]
lea ecx, [esi + 2]
jmp 0x1002bf90
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1002bf90
sub esi, ecx
sar esi, 1
cmp esi, 0x104
jae 0x1002c074
push esi
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call sub.msvcrt.dll__wcsnicmp
xor ecx, ecx
add esp, 0xc
test eax, eax
sete cl
mov dword [ebp - 0x262c], ecx
test eax, eax
jne 0x1002c080
lea eax, [ebp - 0x218]
cmp word [eax + esi*2], 0x5c
lea eax, [eax + esi*2]
jne 0x1002c080
push eax
lea eax, [ebp - 0xc]
push eax
push 0x10205358
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.1000aa70
lea eax, [ebp - 0x628]
add esp, 0x14
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1002c012
sub eax, edx
sar eax, 1
cmp eax, 0x7ffffffe
jbe 0x1002c033
xor eax, eax
mov word [ebp - 0x218], ax
jmp 0x1002c06f
lea ecx, [ebp - 0x218]
mov edx, 0x105
lea ebx, [ebp - 0x628]
mov esi, ecx
sub ebx, esi
test eax, eax
je 0x1002c063
movzx esi, word [ebx + ecx]
test si, si
je 0x1002c063
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x1002c048
jmp 0x1002c067
test edx, edx
jne 0x1002c06a
sub ecx, 2
xor eax, eax
mov word [ecx], ax
mov ebx, 1
mov ecx, dword [ebp - 0x262c]
lea ebx, [ebx]
movzx eax, word [edi]
add edi, 2
test ax, ax
jne 0x1002c080
test ecx, ecx
jne 0x1002c09d
movzx eax, word [edi]
mov ecx, eax
test ax, ax
jne 0x1002bf60
mov esi, dword [ebp - 0x2638]
mov edi, dword [ebp - 0x263c]
push dword [ebp - 0x2640]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x2644]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2630]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1002be95
xor eax, eax
mov dword [esi + 0x10], 0
lea ecx, [ebp - 0x218]
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002c0f1
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.100070c0
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101f99c6
mov esp, ebp
pop ebp
ret