Function at 0x40f900
Capabilities:
Read file via mapping

Disassembly:
mov eax, 0x41e928
call fcn.0041cd20
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.004106f9
mov esi, eax
cmp esi, ebx
jge 0x40f92f
call fcn.0040eaf8
lea eax, [ebp - 0x64]
push esi
push eax
mov ecx, edi
call fcn.0040797f
inc esi
lea eax, [ebp - 0x40]
push esi
push eax
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.004078af
push ebx
push 0x3a
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.004106f9
mov esi, eax
cmp esi, ebx
jge 0x40f965
call fcn.0040eaf8
lea eax, [ebp - 0x58]
push esi
push eax
lea ecx, [ebp - 0x40]
call fcn.0040797f
inc esi
lea eax, [ebp - 0x4c]
push esi
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.004078af
mov ecx, dword [ebp - 0x58]
xor edx, edx
mov byte [ebp - 4], 3
call fcn.00408776
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.0040cb55
push dword [eax]
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x40f9bf
xor eax, eax
jmp 0x40f9c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x34]
cmp eax, ebx
setne byte [ebp - 0x11]
call fcn.00408005
cmp byte [ebp - 0x11], bl
pop ecx
je 0x40f9e3
mov ecx, str.Can_not_open_mapping
call fcn.0040eb03
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 0x40fa04
mov ecx, str.MapViewOfFile_error
call fcn.0040eb03
cmp word [edi], bx
mov byte [ebp - 4], 5
je 0x40fa17
mov ecx, str.Incorrect_mapping_data
call fcn.0040eb03
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 0x40fa6c
mov ax, word [edi + esi*2]
cmp ax, bx
jne 0x40fa60
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x34]
push dword [ebp + 8]
call fcn.0040f5cf
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x30], ebx
mov word [eax], bx
jmp 0x40fa69
push eax
lea ecx, [ebp - 0x34]
call fcn.004058a2
inc esi
jmp 0x40fa36
cmp dword [ebp - 0x30], ebx
je 0x40fa7b
mov ecx, str.data_error
call fcn.0040eb03
push dword [ebp - 0x34]
call fcn.00408005
pop ecx
mov dword [ebp - 4], 4
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x18], ebx
je 0x40faa0
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.0040cb55
push dword [eax]
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x40fac8
xor esi, esi
jmp 0x40fad0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x34]
call fcn.00408005
cmp esi, ebx
pop ecx
jne 0x40fae5
lea ecx, [ebp + 0xc]
call fcn.0041cb90
lea ecx, [ebp + 0xc]
call fcn.0041cb20
push dword [ebp - 0x4c]
call fcn.00408005
push dword [ebp - 0x58]
call fcn.00408005
push dword [ebp - 0x40]
call fcn.00408005
push dword [ebp - 0x64]
call fcn.00408005
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 8