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

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x14
push ebx
push ebp
push esi
mov esi, ecx
push edi
push eax
mov dword [esi + 8], eax
call dword [sym.imp.USER32.dll_GetDC]
mov dword [esi + 0x7a], eax
mov eax, dword [esi + 0x7e]
xor ebp, ebp
cmp eax, ebp
je 0x42f79c
push eax
call fcn.004aa713
add esp, 4
mov eax, dword [esi + 0x86]
cmp eax, ebp
je 0x42f7af
push eax
call fcn.004aa713
add esp, 4
mov eax, dword [esi + 0x92]
cmp eax, ebp
je 0x42f7c6
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [esi + 0x92], ebp
mov eax, dword [esp + 0x28]
push ebp
push 0x8000080
push 3
push ebp
push 1
push SysReAllocStringLen
push eax
mov dword [esi + 0x86], ebp
mov dword [esi + 0x7e], ebp
mov dword [esi + 0x6a], ebp
mov dword [esi + 0x56], ebp
mov dword [esi + 0x4a], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x42f8fe
lea ecx, [esp + 0x10]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x28], eax
je 0x42f8f7
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x2c]
push ebp
push edx
lea eax, [esp + 0x1c]
push 0xd
push eax
push edi
call ebx
cmp dword [esp + 0x2c], 0xd
jne 0x42f8f7
cmp byte [esp + 0x14], 0x47
jne 0x42f8f7
cmp byte [esp + 0x15], 0x49
jne 0x42f8f7
cmp byte [esp + 0x16], 0x46
jne 0x42f8f7
cmp byte [esp + 0x17], 0x38
jne 0x42f8f7
mov al, byte [esp + 0x18]
cmp al, 0x37
je 0x42f874
cmp al, 0x39
jne 0x42f8f7
cmp byte [esp + 0x19], 0x61
jne 0x42f8f7
mov ecx, dword [esp + 0x1a]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x1f]
and ecx, 0xffff
mov dword [esi], ecx
mov cl, byte [esp + 0x1e]
and edx, 0xffff
and eax, 0xff
test cl, 0x80
mov dword [esi + 4], edx
mov dword [esi + 0x46], eax
je 0x42f90a
and ecx, 7
mov eax, 1
inc ecx
shl eax, cl
mov dword [esi + 0x56], eax
lea ecx, [eax + eax*2]
push ecx
call fcn.004aa6ea
mov ecx, dword [esi + 0x56]
add esp, 4
lea edx, [esp + 0x2c]
mov dword [esi + 0x7e], eax
push ebp
lea ecx, [ecx + ecx*2]
push edx
push ecx
push eax
push edi
call ebx
mov eax, dword [esi + 0x56]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x2c]
cmp eax, edx
je 0x42f90a
mov eax, dword [esi + 0x7e]
push eax
call fcn.004aa713
add esp, 4
mov dword [esi + 0x7e], ebp
mov dword [esi + 0x56], ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 8
mov eax, dword [esi + 0x56]
add eax, 4
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x28]
sub eax, ecx
push eax
mov dword [esi + 0x4a], eax
call fcn.004aa6ea
add esp, 4
cmp eax, ebp
mov dword [esi + 0x86], eax
mov dword [esi + 0x8a], eax
je 0x42f8fe
mov ecx, dword [esi + 0x4a]
lea edx, [esp + 0x2c]
push ebp
push edx
push ecx
push eax
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi + 0x4a]
xor eax, eax
cmp edx, ebp
jle 0x42f984
mov ecx, dword [esi + 0x8a]
mov bl, 0xf9
cmp byte [ecx + eax], 0x21
jne 0x42f967
cmp byte [ecx + eax + 1], bl
je 0x42f97b
inc eax
cmp eax, edx
jl 0x42f95b
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 8
xor edx, edx
mov dl, byte [ecx + eax + 4]
mov dword [esi + 0x66], edx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 8