Function at 0x4967b0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cc7f3
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x50ac94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 4], edi
lea ebx, [esi + 0x20]
call fcn.0049ff8a
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4967fb
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x38], edi
mov edi, dword [ebx]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x496869
cmp dword [edi + 0xc], 0
jl 0x49685a
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x49685a
push eax
call fcn.00424240
mov dword [ebp - 0x10], eax
add esp, 4
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x496850
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x10
mov dword [ebx], ecx
jmp 0x496866
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, ebx
call fcn.004241cf
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
xor ebx, ebx
push ebx
push 0x80
push 3
mov edx, edi
neg edx
sbb edx, edx
push ebx
and edx, 0x116
push 1
add edx, 0x120089
push edx
push ecx
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x4968b7
push 0x4fdbdc
lea eax, [ebp + 0x10]
push eax
mov dword [ebp + 0x10], str.Cant_open_file
call fcn.004b473c
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], ebx
cmp ebx, ebx
ja 0x4968ee
jb 0x4968d0
cmp eax, 0x40
jae 0x4968ee
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4fdbdc
lea edx, [ebp + 0x10]
push edx
mov dword [ebp + 0x10], str.Incorrect_PE_file__too_small_
call fcn.004b473c
mov ecx, dword [esi]
xor eax, eax
cmp edi, ebx
push ebx
setne al
push ebx
push ebx
lea eax, [eax + eax + 2]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x49692c
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4fdbdc
lea eax, [ebp + 0x10]
push eax
mov dword [ebp + 0x10], str.Cant_create_file_mapping
call fcn.004b473c
xor ecx, ecx
cmp edi, ebx
setne cl
push ebx
push ebx
push ebx
lea ecx, [ecx + ecx + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x30], eax
cmp eax, ebx
jne 0x49696f
mov edx, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov eax, dword [esi]
push eax
call edi
push 0x4fdbdc
lea ecx, [ebp + 0x10]
push ecx
mov dword [ebp + 0x10], str.Cant_create_map_file_view
call fcn.004b473c
mov dword [esi + 0x34], 1
mov dword [esi + 0x38], edi
call fcn.004969c0
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 0x4969a4
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 0xc