Function at 0x4ac210
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4edc2b
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x541100]
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.004bdbe3
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4ac25f
push 0x80004005
call fcn.00420000
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.00422f41
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 0x4ac330
call fcn.004bdbe3
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4ac2d6
push 0x80004005
call fcn.00420000
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 0x4ac311
mov edx, ecx
movzx esi, dx
push esi
call fcn.004c5d7f
cmp eax, edi
je 0x4ac31e
push esi
push eax
lea ecx, [ebp - 0x10]
call fcn.00422eb3
jmp 0x4ac31e
push str.Cant_open_file
lea ecx, [ebp - 0x10]
call fcn.0042b51c
push 0x52f95c
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 4], 1
call fcn.004d3abc
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 0x4ac373
jb 0x4ac349
cmp eax, 0x40
jae 0x4ac373
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.00439a19
push 0x52f95c
lea edx, [ebp - 0x10]
push edx
call fcn.004d3abc
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 0x4ac3bd
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.00439a19
push 0x52f95c
lea eax, [ebp - 0x10]
push eax
call fcn.004d3abc
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 0x4ac40f
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.00439a19
push 0x52f95c
lea ecx, [ebp - 0x10]
push ecx
call fcn.004d3abc
mov ecx, esi
mov dword [esi + 0x34], 1
mov dword [esi + 0x38], ebx
call fcn.004ac460
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 0x4ac446
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