Function at 0x4020aa
Capabilities:
Read file via mapping

Disassembly:
push 0x4c
mov eax, 0x432878
call fcn.0042a1d7
mov ecx, dword [ebp + 0xc]
xor ebx, ebx
push ebx
push 0x3a
call fcn.004017e9
mov esi, eax
cmp esi, ebx
jge 0x4020ce
call fcn.004019fe
mov ecx, dword [ebp + 0xc]
push esi
lea eax, [ebp - 0x58]
push eax
call fcn.00401f18
mov ecx, dword [ebp + 0xc]
inc esi
push esi
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 4], ebx
call fcn.00401ef7
push ebx
push 0x3a
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.004017e9
mov esi, eax
cmp esi, ebx
jl 0x4020c9
push esi
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x34]
call fcn.00401f18
inc esi
push esi
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
call fcn.00401ef7
push ebx
push dword [ebp - 0x4c]
mov byte [ebp - 4], 3
call fcn.00421ae8
mov esi, eax
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 4
call fcn.0040b8e3
push dword [eax]
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x40215c
xor eax, eax
jmp 0x402162
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x28]
cmp eax, ebx
setne byte [ebp + 0xf]
call fcn.00421999
pop ecx
cmp byte [ebp + 0xf], bl
je 0x402180
push str.Can_not_open_mapping
call fcn.00401996
push esi
push ebx
push ebx
push 4
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 0x18], edi
cmp edi, ebx
jne 0x40219e
push str.MapViewOfFile_error
jmp 0x40217b
mov byte [ebp - 4], 5
cmp word [edi], bx
je 0x4021ae
push str.Incorrect_mapping_data
jmp 0x40217b
shr esi, 1
push 3
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.004011b0
xor esi, esi
mov byte [ebp - 4], 6
inc esi
cmp esi, dword [ebp + 0xc]
jae 0x402206
movzx eax, word [edi + esi*2]
cmp ax, bx
jne 0x4021fa
push dword [ebp + 0x10]
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 8]
mov eax, dword [ebp + 0x14]
call fcn.0040106a
mov ecx, dword [ebp - 0x28]
xor eax, eax
mov dword [ebp - 0x24], ebx
mov word [ecx], ax
jmp 0x402203
push eax
lea ecx, [ebp - 0x28]
call fcn.0040141f
inc esi
jmp 0x4021cd
cmp dword [ebp - 0x24], ebx
je 0x402215
push str.data_error
jmp 0x40217b
push dword [ebp - 0x28]
call fcn.00421999
pop ecx
push edi
mov dword [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea ecx, [ebp - 0x14]
call fcn.00401000
mov dword [ebp + 0xc], ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 8
call fcn.0040b8e3
push dword [eax]
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov dword [ebp + 0xc], eax
cmp eax, ebx
je 0x40225e
xor esi, esi
jmp 0x402266
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x28]
call fcn.00421999
pop ecx
cmp esi, ebx
jne 0x40227c
lea eax, [ebp + 0xc]
push eax
call fcn.00420734
lea eax, [ebp + 0xc]
push eax
call fcn.004206a8
push dword [ebp - 0x40]
call fcn.00421999
push dword [ebp - 0x4c]
call fcn.00421999
push dword [ebp - 0x34]
call fcn.00421999
push dword [ebp - 0x58]
call fcn.00421999
add esp, 0x10
call fcn.0042a27c
ret 0x10