Function at 0x4aacb0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ec57b
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x53d100]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
lea edi, [esi + 0x20]
call fcn.004bc4b7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4aacff
push 0x80004005
call fcn.00422000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [edi], eax
lea ecx, [ebp + 0xc]
push ecx
mov byte [ebp - 4], 1
mov ecx, edi
mov dword [esi + 0x38], 0
call fcn.00424f10
mov eax, dword [ebp + 0xc]
xor edi, edi
push edi
push 0x80
push 3
mov edx, ebx
neg edx
sbb edx, edx
push edi
and edx, 0x116
push 1
add edx, 0x120089
push edx
push eax
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 0x34], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x4aadd0
call fcn.004bc4b7
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4aad76
push 0x80004005
call fcn.00422000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov ecx, str.Cant_open_file
mov byte [ebp - 4], 2
test ecx, 0xffff0000
jne 0x4aadb1
mov edx, ecx
movzx esi, dx
push esi
call fcn.004c463d
cmp eax, edi
je 0x4aadbe
push esi
push eax
lea ecx, [ebp - 0x10]
call fcn.00424e82
jmp 0x4aadbe
push str.Cant_open_file
lea ecx, [ebp - 0x10]
call fcn.0042d0b5
push 0x52c0b4
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 4], 1
call fcn.004d238c
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], edi
cmp edi, edi
ja 0x4aae13
jb 0x4aade9
cmp eax, 0x40
jae 0x4aae13
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Incorrect_PE_file__too_small_
lea ecx, [ebp - 0x10]
mov dword [esi], 0xffffffff
call fcn.0043aecb
push 0x52c0b4
lea edx, [ebp - 0x10]
push edx
call fcn.004d238c
mov ecx, dword [esi]
xor eax, eax
cmp ebx, edi
push edi
setne al
push edi
push edi
lea eax, [eax + eax + 2]
push eax
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 4], eax
cmp eax, edi
jne 0x4aae5d
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Cant_create_file_mapping
lea ecx, [ebp - 0x10]
mov dword [esi], 0xffffffff
call fcn.0043aecb
push 0x52c0b4
lea eax, [ebp - 0x10]
push eax
call fcn.004d238c
xor ecx, ecx
cmp ebx, edi
setne cl
push edi
push edi
push edi
lea ecx, [ecx + ecx + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x30], eax
cmp eax, edi
jne 0x4aaeaf
mov edx, dword [esi + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebx
mov eax, dword [esi]
push eax
mov dword [esi + 4], edi
call ebx
push str.Cant_create_map_file_view
lea ecx, [ebp - 0x10]
mov dword [esi], 0xffffffff
call fcn.0043aecb
push 0x52c0b4
lea ecx, [ebp - 0x10]
push ecx
call fcn.004d238c
mov ecx, esi
mov dword [esi + 0x34], 1
mov dword [esi + 0x38], ebx
call fcn.004aaf00
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4aaee6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8