Function at 0x4124e7
Capabilities:
Read file via mapping

Disassembly:
mov eax, 0x474ae4
call fcn.00470460
sub esp, 0x38
push ebx
push esi
mov dword [ebp - 0x1c], ecx
push edi
push edx
lea ecx, [ebp - 0x38]
call fcn.004030e1
mov ecx, dword [ebp - 0x38]
xor ebx, ebx
mov dx, 0x3a
mov dword [ebp - 4], ebx
call fcn.004023cf
mov esi, eax
cmp esi, ebx
jge 0x412525
mov esi, dword [str.Incorrect_Map_command]
jmp 0x412706
mov eax, dword [ebp - 0x38]
mov dx, 0x3a
lea ecx, [eax + esi*2 + 2]
call fcn.004023cf
cmp eax, ebx
jl 0x41251a
lea edi, [eax + esi + 1]
cmp edi, ebx
jl 0x41251a
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x44]
lea eax, [eax + edi*2 + 2]
push eax
call fcn.0040300c
cmp edi, dword [ebp - 0x34]
jae 0x412560
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x34], edi
mov word [eax + edi*2], bx
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x14]
lea ecx, [eax + esi*2 + 2]
call fcn.0041132e
test al, al
je 0x4126f5
cmp dword [ebp - 0x14], 2
jb 0x4126f5
cmp dword [ebp - 0x14], 0x80000000
ja 0x4126f5
test byte [ebp - 0x14], 1
jne 0x4126f5
cmp esi, dword [ebp - 0x34]
jae 0x4125a7
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x34], esi
mov word [eax + esi*2], bx
mov dword [ebp - 0x10], ebx
push dword [ebp - 0x38]
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x4125dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x4125dd
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00412722
mov esi, str.Cannot_open_mapping
jmp 0x4126fa
push dword [ebp - 0x14]
push ebx
push ebx
push 4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
jne 0x412609
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00412722
mov esi, str.MapViewOfFile_error
jmp 0x4126fa
mov dword [ebp - 0x20], edi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.00402fc9
cmp word [edi], bx
mov byte [ebp - 4], 4
je 0x412647
push dword [ebp - 0x2c]
call fcn.00401f2a
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00412722
mov esi, str.Unsupported_Map_data
jmp 0x4126fa
mov eax, dword [ebp - 0x14]
shr eax, 1
cmp eax, 1
jbe 0x4126a7
dec eax
lea ebx, [edi + 2]
mov dword [ebp - 0x18], eax
mov si, word [ebx]
test si, si
jne 0x41267b
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x2c]
push eax
call fcn.00411ef6
mov eax, dword [ebp - 0x2c]
and dword [ebp - 0x28], 0
and word [eax], si
jmp 0x41269e
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x24], eax
jne 0x41268b
lea ecx, [ebp - 0x2c]
call fcn.00402d8e
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov word [ecx + eax*2], si
inc eax
and word [ecx + eax*2], 0
mov dword [ebp - 0x28], eax
inc ebx
inc ebx
dec dword [ebp - 0x18]
jne 0x412658
xor ebx, ebx
cmp dword [ebp - 0x28], ebx
push dword [ebp - 0x2c]
je 0x4126cf
call fcn.00401f2a
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00412722
mov esi, str.Map_data_error
jmp 0x4126fa
call fcn.00401f2a
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x10], ebx
je 0x4126f1
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4126f1
mov dword [ebp - 0x10], ebx
xor esi, esi
jmp 0x4126fa
mov esi, str.Unsupported_Map_data_size
and byte [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.0041274a
push dword [ebp - 0x38]
call fcn.00401f2a
pop ecx
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4