Function at 0x40e18d
Capabilities:
Read file via mapping

Disassembly:
mov eax, 0x46aa04
call fcn.00461cc8
sub esp, 0x4c
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
push ebx
push 0x3a
call fcn.0040eee6
mov esi, eax
cmp esi, ebx
jge 0x40e1b8
call fcn.0040d362
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x58]
push esi
push eax
call fcn.00406152
mov ecx, dword [ebp + 0xc]
inc esi
lea eax, [ebp - 0x34]
push esi
push eax
mov dword [ebp - 4], ebx
call fcn.00406082
push ebx
push 0x3a
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.0040eee6
mov esi, eax
cmp esi, ebx
jge 0x40e1f0
call fcn.0040d362
lea eax, [ebp - 0x4c]
push esi
push eax
lea ecx, [ebp - 0x34]
call fcn.00406152
inc esi
lea eax, [ebp - 0x40]
push esi
push eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
call fcn.00406082
push ebx
mov byte [ebp - 4], 3
push dword [ebp - 0x4c]
call fcn.00406f26
mov esi, eax
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040e3b6
push dword [eax]
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
push dword [ebp - 0x28]
cmp eax, ebx
mov dword [ebp - 0x14], eax
sete byte [ebp + 0xf]
call fcn.0040675c
cmp byte [ebp + 0xf], bl
pop ecx
je 0x40e261
push str.Can_not_open_mapping
call fcn.0040d36e
push esi
push ebx
push ebx
push 4
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x18], edi
jne 0x40e282
push str.MapViewOfFile_error
call fcn.0040d36e
cmp word [edi], bx
mov byte [ebp - 4], 5
je 0x40e295
push str.Incorrect_mapping_data
call fcn.0040d36e
shr esi, 1
push 0xf
lea ecx, [ebp - 0x28]
mov dword [ebp + 0xc], esi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.0040152b
push 1
mov byte [ebp - 4], 6
pop esi
cmp esi, dword [ebp + 0xc]
jae 0x40e2eb
mov ax, word [edi + esi*2]
cmp ax, bx
jne 0x40e2df
push dword [ebp + 0x14]
lea eax, [ebp - 0x28]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.0040ddf2
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], ebx
mov word [eax], bx
jmp 0x40e2e8
push eax
lea ecx, [ebp - 0x28]
call fcn.00404303
inc esi
jmp 0x40e2b4
cmp dword [ebp - 0x24], ebx
je 0x40e2fa
push str.data_error
call fcn.0040d36e
push dword [ebp - 0x28]
call fcn.0040675c
pop ecx
mov dword [ebp - 4], 4
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x14], ebx
je 0x40e31f
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0xc], ebx
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040e3b6
push dword [eax]
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x40e349
xor esi, esi
jmp 0x40e351
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x28]
call fcn.0040675c
cmp esi, ebx
pop ecx
jne 0x40e367
lea eax, [ebp + 0xc]
push eax
call fcn.00455070
lea eax, [ebp + 0xc]
push eax
call fcn.00455140
push dword [ebp - 0x40]
call fcn.0040675c
push dword [ebp - 0x4c]
call fcn.0040675c
push dword [ebp - 0x34]
call fcn.0040675c
push dword [ebp - 0x58]
call fcn.0040675c
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x10