Function at 0x10009130
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000e3bb
mov eax, dword fs:[0]
push eax
sub esp, 0x420
mov eax, dword [0x10014018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 8]
mov ebx, edx
call fcn.10009370
cmp dword [esi + 0x14], 8
jb 0x10009172
mov esi, dword [esi]
push 0
push 0x80
push 3
push 0
push 1
push connect
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebx]
mov dword [ecx], eax
mov eax, dword [ebx]
cmp dword [eax], 0xffffffff
jne 0x100091ec
push 0x3ff
lea edx, [ebp - 0x40f]
push 0
push edx
mov byte [ebp - 0x410], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x410]
push str.Could_not_open_the_file:__d
push eax
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
push 0x10
push str.Error
lea ecx, [ebp - 0x410]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor al, al
jmp 0x10009344
lea edx, [eax + 0x10]
mov eax, dword [eax]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebx]
mov dword [ecx + 0xc], eax
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 0x10]
push 0
push edx
mov edx, dword [eax]
push ecx
push 2
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, dword [ebx]
mov dword [ecx + 4], eax
mov edx, dword [ebx]
mov eax, dword [edx + 4]
test eax, eax
jne 0x10009245
call fcn.10009370
push 0x10
push 0x1000f34c
push str.Could_not_map_the_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
jmp 0x10009344
push pe_nt_image_headers32
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebx]
mov dword [ecx + 8], eax
mov eax, dword [ebx]
cmp dword [eax + 8], 0
jne 0x10009284
call fcn.10009370
push 0x10
push 0x1000f34c
push str.Could_not_map_a_view_of_the_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
jmp 0x10009344
test edi, edi
jne 0x100092a7
call fcn.10009370
push 0x10
push 0x1000f34c
push str.No_key_provided
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
jmp 0x10009344
lea esi, [eax + 0x14]
mov ecx, edi
call fcn.10007e70
mov edx, dword [ebx]
mov eax, dword [edx + 8]
cmp dword [eax + 0x1e], 0x1000002
je 0x100092dc
call fcn.10009370
push 0x10
push 0x1000f34c
push str.header__version___0x01000002
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor al, al
jmp 0x10009344
lea edi, [ebp - 0x42c]
call fcn.10003e60
xor esi, esi
mov ecx, str.JoyMax_File_Manager__n
mov dword [ebp - 4], esi
call fcn.1000ad30
test al, al
je 0x1000931d
call fcn.10009370
push 0x10
push str.Error
push str.headerName____JoyMax_File_Manager__n_
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, edi
call fcn.10007000
xor al, al
jmp 0x10009344
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebx]
mov dword [edx + 8], esi
mov eax, dword [ebx]
lea esi, [ebp - 0x42c]
mov dword [eax + 0x1c], pe_nt_image_headers32
call fcn.10007000
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000d500
mov esp, ebp
pop ebp
ret 4