Function at 0x4f9d53
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov eax, dword [esi]
push edi
mov dword [esi + 0x240], ebx
call dword [eax + 0xc]
xor edi, edi
xor eax, eax
cmp ebx, edi
setne al
push edi
push 0x80
add eax, 3
push eax
push edi
push edi
push 0xc0000000
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x210], eax
cmp eax, 0xffffffff
je 0x4f9faf
lea ebx, [esi + 0x224]
cmp dword [ebx], edi
jne 0x4f9dd3
lea edi, [esi + 0x220]
cmp dword [edi], 0
jne 0x4f9dd1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x4f9dd1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4f9faf
xor edi, edi
cmp dword [ebp + 8], 1
jne 0x4f9de7
mov dword [esi + 0x234], edi
mov dword [esi + 0x230], edi
jmp 0x4f9e4d
cmp dword [ebp + 8], 2
jne 0x4f9e35
lea edi, [esi + 0x234]
push edi
push dword [esi + 0x210]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x230], eax
cmp eax, 0xffffffff
jne 0x4f9e19
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4f9faf
mov eax, dword [esi + 0x230]
cmp eax, dword [esi + 0x220]
jae 0x4f9e29
mov dword [ebx], eax
mov eax, dword [edi]
xor edi, edi
cmp eax, dword [ebx]
jge 0x4f9e4d
mov dword [ebx], eax
jmp 0x4f9e4d
mov eax, dword [esi + 0x220]
mov dword [esi + 0x230], eax
mov eax, dword [esi + 0x224]
mov dword [esi + 0x234], eax
mov eax, dword [esi + 0x220]
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x224]
mov dword [ebp - 4], eax
mov ecx, 3
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
shrd eax, edx, cl
sar edx, cl
cmp edx, edi
mov ecx, 0x1000
jl 0x4f9eae
jg 0x4f9e7e
cmp eax, ecx
jbe 0x4f9eae
mov eax, dword [esi + 0x220]
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x224]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov ecx, 3
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
shrd eax, edx, cl
sar edx, cl
jmp 0x4f9eb2
mov eax, ecx
xor edx, edx
cmp dword [ebp + 8], 2
mov dword [esi + 0x238], eax
mov dword [esi + 0x23c], edx
je 0x4f9ed6
cmp dword [ebp + 8], 1
jne 0x4f9ee4
cmp dword [ebx], edi
jne 0x4f9ee4
cmp dword [esi + 0x220], edi
jne 0x4f9ee4
add dword [esi + 0x220], eax
mov eax, edx
adc dword [esi + 0x224], eax
push edi
push ebx
push dword [esi + 0x220]
push dword [esi + 0x210]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4f9f0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4f9faf
push dword [esi + 0x210]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x4f9faf
xor eax, eax
cmp dword [ebp + 8], edi
push edi
push dword [esi + 0x220]
setne al
push dword [ebx]
lea eax, [eax + eax + 2]
push eax
push edi
push dword [esi + 0x210]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 0x214], eax
cmp eax, edi
je 0x4f9faf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4f9faf
xor eax, eax
cmp dword [ebp + 8], edi
push edi
sete al
push edi
push edi
lea eax, [eax + eax + 2]
push eax
push dword [esi + 0x214]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x218], eax
cmp eax, edi
je 0x4f9faf
cmp dword [ebp + 8], 2
jne 0x4f9f9f
mov eax, dword [esi + 0x230]
mov dword [esi + 0x228], eax
mov eax, dword [esi + 0x234]
mov dword [esi + 0x22c], eax
jmp 0x4f9fab
mov dword [esi + 0x22c], edi
mov dword [esi + 0x228], edi
xor eax, eax
jmp 0x4f9fb2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 4