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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x518
push ebx
push esi
push edi
lea eax, [ebp - 0x518]
push 0x400
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x518]
push 0x2e
push ecx
call fcn.00566800
mov edx, eax
add esp, 8
cmp edx, ebx
jne 0x50e1cf
lea edi, [ebp - 0x518]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [ebp + ecx - 0x518]
mov edi, str..MAP
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x10000000
mov eax, ecx
mov esi, edi
mov edi, edx
push 3
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x518]
push DirectSoundCreate
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x50e230
lea edx, [ebp - 0x518]
push edx
push str.Map_file__s_not_found.
call fcn.00558660
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push ebx
push ebx
push 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
jne 0x50e261
push str.CreateFileMapping_failed.
call fcn.00558660
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebx
push ebx
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov eax, dword [ebp - 4]
push eax
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
jne 0x50e2a3
push str.MapViewOfFile_failed.
call fcn.00558660
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 1
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], edi
jmp 0x50e2b2
xor ebx, ebx
push 0xd
push esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov dword [0x6e289c], ebx
call fcn.00568220
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x50e418
mov eax, ebx
lea edi, [ebp - 0x518]
sub eax, esi
push str.Publics_by_Value
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebp + eax - 0x518], 0
lea eax, [ebp - 0x518]
push eax
call fcn.005689d0
add esp, 8
test eax, eax
je 0x50e317
mov esi, 1
mov dword [ebp - 0x10], esi
jmp 0x50e31a
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x50e3fa
push 6
lea ecx, [ebp - 0x518]
push str._0001:
push ecx
call fcn.00567310
add esp, 0xc
test eax, eax
jne 0x50e3dc
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x118]
push edx
push eax
lea ecx, [ebp - 0x518]
push str._s__s__x
push ecx
call fcn.005678d0
add esp, 0x10
cmp eax, 2
jne 0x50e3dc
cmp dword [ebp - 0xc], 2
jne 0x50e3b5
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
add edx, eax
lea edi, [ebp - 0x118]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x6e28a4]
mov ecx, dword [0x6e289c]
mov dword [eax + ecx*8], edx
mov eax, dword [0x6e289c]
mov ecx, dword [0x6e28a4]
mov edx, dword [ebp - 0x14]
mov dword [ecx + eax*8 + 4], edx
lea edi, [ebp - 0x118]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebp - 8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 1]
mov dword [ebp - 8], eax
mov eax, dword [0x6e289c]
inc eax
mov dword [0x6e289c], eax
jmp 0x50e3fa
test esi, esi
je 0x50e3fa
push 6
lea ecx, [ebp - 0x518]
push str._0002:
push ecx
call fcn.00567310
add esp, 0xc
test eax, eax
je 0x50e412
lea esi, [ebx + 2]
push 0xd
push esi
call fcn.00568220
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x50e2d3
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0xc]
cmp edi, 1
jne 0x50e459
mov edx, dword [0x6e289c]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
lea eax, [edx*8]
push eax
push 0x40
call ebx
mov ecx, dword [ebp - 8]
mov dword [0x6e28a4], eax
push ecx
push 0x40
call ebx
mov edx, dword [0x6e289c]
mov dword [ebp - 4], eax
push edx
push str._d_symbols_parsed_from_map_file.
call fcn.00558660
add esp, 8
inc edi
cmp edi, 2
mov dword [ebp - 0xc], edi
jle 0x50e2b0
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret