Function at 0x40cd8f
Capabilities:
Read file via mapping

Disassembly:
mov eax, 0x41bc7c
call fcn.0041a3e0
sub esp, 0x58
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
mov edi, edx
mov dword [ebp - 0x20], ecx
push ebx
push 0x3a
mov ecx, edi
call fcn.0040db80
mov esi, eax
cmp esi, ebx
jge 0x40cdbe
call fcn.0040bfe0
lea eax, [ebp - 0x64]
push esi
push eax
mov ecx, edi
call fcn.00406ac8
inc esi
lea eax, [ebp - 0x40]
push esi
push eax
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.004069f8
push ebx
push 0x3a
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.0040db80
mov esi, eax
cmp esi, ebx
jge 0x40cdf4
call fcn.0040bfe0
lea eax, [ebp - 0x58]
push esi
push eax
lea ecx, [ebp - 0x40]
call fcn.00406ac8
inc esi
lea eax, [ebp - 0x4c]
push esi
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.004069f8
mov ecx, dword [ebp - 0x58]
xor edx, edx
mov byte [ebp - 4], 3
call fcn.0040771b
mov esi, eax
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], ebx
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call fcn.00415d8d
push dword [eax]
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
cmp eax, ebx
mov dword [ebp - 0x18], eax
push dword [ebp - 0x34]
sete byte [ebp - 0x11]
call fcn.00407103
cmp byte [ebp - 0x11], bl
pop ecx
je 0x40ce64
mov ecx, str.Can_not_open_mapping
call fcn.0040bfeb
push esi
push ebx
push ebx
push 4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x24], edi
jne 0x40ce85
mov ecx, str.MapViewOfFile_error
call fcn.0040bfeb
cmp word [edi], bx
mov byte [ebp - 4], 5
je 0x40ce98
mov ecx, str.Incorrect_mapping_data
call fcn.0040bfeb
shr esi, 1
push 3
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
call fcn.0040161e
push 1
mov byte [ebp - 4], 6
pop esi
cmp esi, dword [ebp - 0x1c]
jae 0x40ceed
mov ax, word [edi + esi*2]
cmp ax, bx
jne 0x40cee1
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x34]
push dword [ebp + 8]
call fcn.0040ca4d
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x30], ebx
mov word [eax], bx
jmp 0x40ceea
push eax
lea ecx, [ebp - 0x34]
call fcn.00404b92
inc esi
jmp 0x40ceb7
cmp dword [ebp - 0x30], ebx
je 0x40cefc
mov ecx, str.data_error
call fcn.0040bfeb
push dword [ebp - 0x34]
call fcn.00407103
pop ecx
mov dword [ebp - 4], 4
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x18], ebx
je 0x40cf21
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0xc], ebx
lea edx, [ebp - 0x4c]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 8
call fcn.00415d8d
push dword [eax]
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x40cf49
xor esi, esi
jmp 0x40cf51
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x34]
call fcn.00407103
cmp esi, ebx
pop ecx
jne 0x40cf66
lea ecx, [ebp + 0xc]
call fcn.0041a260
lea ecx, [ebp + 0xc]
call fcn.0041a270
push dword [ebp - 0x4c]
call fcn.00407103
push dword [ebp - 0x58]
call fcn.00407103
push dword [ebp - 0x40]
call fcn.00407103
push dword [ebp - 0x64]
call fcn.00407103
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 8