Function at 0x4a6cd0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x120
push ebx
push ebp
push esi
mov esi, dword [esp + 0x130]
push edi
xor eax, eax
push eax
push eax
mov ebp, ecx
push 4
push eax
push 3
lea edi, [ebp + 4]
mov ecx, 0x10
rep stosd dword es:[edi], eax
push 0xc0000000
mov ecx, 0x10
lea edi, [ebp + 0x58]
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4a6d2c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x120
ret 4
push esi
lea eax, [ebp + 0x54]
push 0x503d1c
push eax
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::Format_1]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
add esp, 0xc
push 0
push ebx
call edi
xor esi, esi
push esi
lea ecx, [esp + 0x20]
push ecx
push 0xa
lea edx, [esp + 0x2c]
push edx
push ebx
mov dword [ebp], eax
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 3
push 0x516fbc
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x1c], esi
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x4a6db8
mov ecx, dword [esp + 0x26]
xor edx, edx
mov dl, ch
and ecx, 0x7f
shl ecx, 0x15
and edx, 0x7f
shl edx, 0xe
mov eax, edx
xor edx, edx
mov dl, byte [esp + 0x28]
and edx, 0x7f
shl edx, 7
or eax, edx
or eax, ecx
xor ecx, ecx
mov cl, byte [esp + 0x29]
and ecx, 0x7f
or eax, ecx
mov dword [esp + 0x10], eax
mov esi, eax
mov eax, dword [ebp]
mov edx, 0xffffff80
sub edx, esi
push 0
add eax, edx
push ebx
mov dword [ebp], eax
call edi
push 0
push 0
sub eax, 0x80
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4a6dfb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x120
ret 4
push 0
lea eax, [esp + 0x20]
push eax
push 0x80
lea ecx, [esp + 0xbc]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4a6e33
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x120
ret 4
push 3
push 0x516fb8
lea edx, [esp + 0xb8]
push edx
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x4a6f85
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov byte [esp + 0x4c], al
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov dword [esp + 0x59], eax
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
push 0x1d
lea ecx, [esp + 0xb7]
mov dword [esp + 0x69], eax
push ecx
lea edx, [esp + 0x54]
mov word [esp + 0x71], ax
push edx
mov byte [esp + 0x77], al
call edi
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksA]
lea ecx, [esp + 0x4c]
push ecx
lea edx, [ebp + 0x48]
push 0x516fb4
push edx
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::Format]
xor eax, eax
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov dword [esp + 0x49], eax
add esp, 0xc
mov dword [esp + 0x41], eax
push 0x1d
lea ecx, [esp + 0xd5]
mov dword [esp + 0x49], eax
push ecx
lea edx, [esp + 0x34]
mov word [esp + 0x51], ax
push edx
mov byte [esp + 0x38], 0
mov byte [esp + 0x57], al
call edi
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksA]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [ebp + 0x44]
push 0x516fb4
push edx
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::Format]
xor eax, eax
mov dword [esp + 0x79], eax
mov dword [esp + 0x7d], eax
mov dword [esp + 0x81], eax
mov dword [esp + 0x85], eax
mov dword [esp + 0x89], eax
add esp, 0xc
mov dword [esp + 0x81], eax
push 0x1d
lea ecx, [esp + 0xf3]
mov dword [esp + 0x89], eax
push ecx
lea edx, [esp + 0x74]
mov word [esp + 0x91], ax
push edx
mov byte [esp + 0x78], 0
mov byte [esp + 0x97], al
call edi
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBlanksA]
lea ecx, [esp + 0x6c]
push ecx
lea edx, [ebp + 0x4c]
push 0x516fb4
push edx
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::Format]
add esp, 0xc
xor eax, eax
cmp esi, eax
je 0x4a6f92
add esi, 0xa
mov dword [esp + 0x10], esi
mov dword [ebp + 0x50], esi
mov byte [esp + 0x14], 0
mov dword [esp + 0x15], eax
mov dword [ebp + 0x98], eax
cmp esi, dword [ebp + 0x50]
mov eax, esi
je 0x4a6fae
lea eax, [esi + 0xa]
cmp esi, dword [ebp]
ja 0x4a703f
push 0
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0xb0]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a703f
cmp byte [esp + 0x14], 0xff
jne 0x4a7033
mov dl, byte [esp + 0x15]
and dl, 0xe0
cmp dl, 0xe0
jne 0x4a7033
push esi
lea eax, [esp + 0x18]
push eax
lea esi, [ebp + 4]
push esi
mov ecx, ebp
call fcn.004a6b40
mov ecx, 0x10
lea edi, [esp + 0x6c]
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x6c], 3
je 0x4a702f
cmp dword [esp + 0x70], 4
je 0x4a702f
mov ecx, dword [esp + 0x74]
mov eax, 0x1f40
cmp ecx, eax
jl 0x4a702f
cmp dword [esp + 0x78], eax
jge 0x4a703f
mov esi, dword [esp + 0x10]
add esi, 4
mov dword [esp + 0x10], esi
jmp 0x4a6fa4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x120
ret 4