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

Disassembly:
sub esp, 0x128
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x2c], ecx
push 0x18056
call fcn.004d8630
mov ebp, eax
or ecx, 0xffffffff
mov edi, 0x5a3088
xor eax, eax
add esp, 4
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x24], ebp
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x34]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x140]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push pe_nt_image_headers32
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x3c]
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..grd
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 1
and ecx, 3
lea eax, [esp + 0x48]
push 0x80000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x457b7c
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [esp + 0x30]
push 0
push ecx
push eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x457b7c
mov ecx, 5
lea edi, [esp + 0x10]
mov esi, ebp
xor edx, edx
mov byte [esp + 0x10], 0x54
mov byte [esp + 0x11], 0x4d
mov byte [esp + 0x12], 9
mov byte [esp + 0x13], 7
mov byte [esp + 0x14], 0
repe cmpsb byte [esi], byte es:[edi]
jne 0x457b7c
lea eax, [ebp + 0x16]
mov dword [esp + 0x18], edx
mov dword [esp + 0x28], 1
jmp 0x457a76
mov eax, dword [esp + 0x10]
mov ebx, dword [eax]
add eax, 4
test bl, bl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], eax
jne 0x457a9f
mov eax, dword [esp + 0x1d]
test al, al
jne 0x457a9f
test ah, ah
jne 0x457a9f
mov al, byte [esp + 0x1f]
test al, al
je 0x457b62
mov ebp, dword [esp + 0x1f]
xor edi, edi
and ebp, 0xff
jle 0x457b52
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x140]
inc ecx
test eax, eax
mov dword [esp + 0x18], ecx
jne 0x457b3f
mov eax, dword [0x5b5f18]
push 0
mov ecx, dword [eax + 0x910]
mov ecx, dword [ecx + 0xb84]
call fcn.004632b0
mov edx, dword [0x5b5f18]
mov esi, eax
xor ecx, ecx
mov eax, dword [edx + 0x910]
mov edx, dword [eax + 0xbd8]
mov eax, dword [esp + 0x1d]
test edx, edx
mov edx, dword [esp + 0x1e]
sete cl
push ecx
mov ecx, ebx
and edx, 0xff
and ecx, 0xff
push edx
and eax, 0xff
lea edx, [ecx + edi*2]
mov ecx, dword [esp + 0x34]
push eax
push edx
push esi
call fcn.00458160
test eax, eax
je 0x457b4a
mov eax, dword [0x5b5f18]
push esi
mov ecx, dword [eax + 0x910]
mov ecx, dword [ecx + 0xb84]
call fcn.00463150
inc edi
cmp edi, ebp
jl 0x457ab1
jmp 0x457b52
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
test eax, eax
jne 0x457a72
push ebp
call fcn.004d86d0
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 8
push ebp
call fcn.004d86d0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 8