Function at 0x4514e0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp - 0x48]
cmp dword [eax + 8], 0
je 0x4514f9
xor eax, eax
jmp 0x45174a
mov dword [ebp - 0x10], str.Local_shmChaosPeer
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0x1000
mov byte [ebp - 0x15], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00451330
add esp, 4
mov edx, dword [ebp - 0x10]
push edx
push 0
mov eax, dword [ebp + 8]
and eax, 1
neg eax
sbb eax, eax
and eax, 4
mov ecx, dword [ebp + 8]
and ecx, 2
neg ecx
sbb ecx, ecx
and ecx, 2
or eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x451569
cmp dword [ebp - 0xc], 0xffffffff
je 0x451569
jmp 0x451639
mov edx, dword [ebp + 8]
and edx, 6
jne 0x451579
or eax, 0xffffffff
jmp 0x45174a
lea ecx, [ebp - 0x40]
call fcn.00451260
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 0
push 4
lea ecx, [ebp - 0x40]
call fcn.004512e0
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
xor edx, edx
cmp dword [ebp - 0x14], 0xb7
setne dl
mov byte [ebp - 0x15], dl
cmp dword [ebp - 0xc], 0
je 0x4515cf
cmp dword [ebp - 0xc], 0xffffffff
je 0x4515cf
lea ecx, [ebp - 0x40]
call fcn.004512c0
jmp 0x451639
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
xor edx, edx
cmp dword [ebp - 0x14], 0xb7
setne dl
mov byte [ebp - 0x15], dl
cmp dword [ebp - 0xc], 0
je 0x451616
cmp dword [ebp - 0xc], 0xffffffff
je 0x451616
lea ecx, [ebp - 0x40]
call fcn.004512c0
jmp 0x451639
mov eax, 0xfffe7960
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x44], eax
lea ecx, [ebp - 0x40]
call fcn.004512c0
mov eax, dword [ebp - 0x44]
jmp 0x45174a
mov edx, dword [ebp - 8]
push edx
push 0
push 0
mov eax, dword [ebp + 8]
and eax, 1
neg eax
sbb eax, eax
and eax, 4
mov ecx, dword [ebp + 8]
and ecx, 2
neg ecx
sbb ecx, ecx
and ecx, 2
or eax, ecx
push eax
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4516a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 0
je 0x451697
mov ecx, 0xfffcf2c0
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0x4c], ecx
jmp 0x45169e
mov dword [ebp - 0x4c], 0xffffff38
mov eax, dword [ebp - 0x4c]
jmp 0x45174a
mov eax, dword [ebp - 0xc]
cdq
mov ecx, dword [ebp - 0x48]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 4]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x48]
call fcn.004465d0
test eax, eax
jne 0x4516cc
or eax, 0xffffffff
jmp 0x45174a
movzx ecx, byte [ebp - 0x15]
test ecx, ecx
je 0x4516f9
mov edx, dword [ebp - 8]
push edx
push 0
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax + 8]
push ecx
call fcn.00496f40
add esp, 0xc
mov ecx, dword [ebp - 0x48]
call fcn.004465d0
mov edx, dword [ebp - 8]
mov dword [eax + 0x1e], edx
jmp 0x451742
mov ecx, dword [ebp - 0x48]
call fcn.004465d0
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 0x1e]
jbe 0x451742
mov ecx, dword [ebp - 0x48]
call fcn.004465d0
mov edx, dword [ebp - 8]
sub edx, dword [eax + 0x1e]
push edx
push 0
mov ecx, dword [ebp - 0x48]
call fcn.004465d0
mov ecx, dword [ebp - 0x48]
mov edx, dword [ecx + 8]
add edx, dword [eax + 0x1e]
push edx
call fcn.00496f40
add esp, 0xc
mov ecx, dword [ebp - 0x48]
call fcn.004465d0
mov ecx, dword [ebp - 8]
mov dword [eax + 0x1e], ecx
mov ecx, dword [ebp - 0x48]
call fcn.00451750
mov esp, ebp
pop ebp
ret 4