Function at 0x40bb7f
Capabilities:
Read file via mapping

Disassembly:
mov eax, 0x460938
call fcn.00458110
sub esp, 0x20
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x14], 0
push ebx
push esi
cmp dword [eax + 8], 0
push edi
jle 0x40bb2c
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 0x14]
xor edi, edi
mov esi, dword [eax + ecx*4]
cmp dword [esi + 4], 2
jl 0x40bb3d
mov eax, dword [esi]
mov ax, word [eax]
push eax
call fcn.00405f8d
cmp ax, 0x52
jne 0x40ba93
mov eax, dword [esi]
push 1
pop edi
lea ecx, [ebp - 0x2c]
mov ax, word [eax + 2]
push dword [0x473eac]
mov word [ebp - 0x10], ax
call fcn.0040258d
mov ecx, dword [eax]
mov eax, ecx
mov dx, word [eax]
cmp dx, word [ebp - 0x10]
je 0x40ba6d
test dx, dx
je 0x40ba75
inc eax
inc eax
jmp 0x40ba5b
sub eax, ecx
sar eax, 1
mov ebx, eax
jmp 0x40ba78
or ebx, 0xffffffff
push dword [ebp - 0x2c]
call fcn.00405c78
pop ecx
push ebx
call fcn.0040b718
test ebx, ebx
mov dword [ebp - 0x10], eax
jl 0x40ba99
push 2
pop edi
jmp 0x40ba99
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 4]
lea ecx, [edi + 2]
cmp eax, ecx
jl 0x40bb53
lea eax, [edi + 1]
mov ecx, esi
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004054d5
mov esi, dword [esi]
and dword [ebp - 4], 0
lea eax, [edi + edi]
cmp word [eax + esi], 0x21
jne 0x40bada
push dword [ebp - 0x10]
lea eax, [ebp - 0x20]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.0040b7b1
jmp 0x40bb0d
cmp word [eax + esi], 0x40
jne 0x40baf4
push dword [ebp - 0x10]
push dword [ebp + 0x10]
push dword [ebp - 0x20]
push dword [ebp + 8]
call fcn.0040b8d6
jmp 0x40bb0d
cmp word [eax + esi], 0x23
jne 0x40bb69
push dword [ebp - 0x10]
lea eax, [ebp - 0x20]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call 0x40bb7f
push dword [ebp - 0x20]
or dword [ebp - 4], 0xffffffff
call fcn.00405c78
inc dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
pop ecx
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 8]
jl 0x40ba16
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
mov eax, dword [str.Incorrect_command_line]
push 0x469300
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
call fcn.00457cfd
mov eax, dword [str.Incorrect_command_line]
push 0x469300
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
call fcn.00457cfd
mov eax, dword [str.Incorrect_command_line]
push 0x469300
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
call fcn.00457cfd
mov eax, 0x46097c
call fcn.00458110
sub esp, 0x64
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.0040cb09
mov esi, eax
cmp esi, ebx
jge 0x40bbbb
mov eax, dword [str.Incorrect_command_line]
push 0x469300
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
call fcn.00457cfd
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x70]
push esi
push eax
call fcn.004055a5
mov ecx, dword [ebp + 0xc]
inc esi
lea eax, [ebp - 0x4c]
push esi
push eax
mov dword [ebp - 4], ebx
call fcn.004054d5
push ebx
push 0x3a
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.0040cb09
mov esi, eax
cmp esi, ebx
jge 0x40bc04
mov eax, dword [str.Incorrect_command_line]
push 0x469300
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00457cfd
lea eax, [ebp - 0x64]
push esi
push eax
lea ecx, [ebp - 0x4c]
call fcn.004055a5
inc esi
lea eax, [ebp - 0x58]
push esi
push eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.004054d5
push ebx
mov byte [ebp - 4], 3
push dword [ebp - 0x64]
call fcn.0040635a
mov esi, eax
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040bdf0
push dword [eax]
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
push dword [ebp - 0x40]
cmp eax, ebx
mov dword [ebp - 0x14], eax
sete byte [ebp + 0xf]
call fcn.00405c78
cmp byte [ebp + 0xf], bl
pop ecx
je 0x40bc80
lea eax, [ebp - 0x20]
push 0x46a0d8
push eax
mov dword [ebp - 0x20], str.Can_not_open_mapping
call fcn.00457cfd
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 - 0x30], edi
jne 0x40bcac
lea eax, [ebp - 0x24]
push 0x46a0d8
push eax
mov dword [ebp - 0x24], str.MapViewOfFile_error
call fcn.00457cfd
cmp word [edi], bx
mov byte [ebp - 4], 5
je 0x40bcca
lea eax, [ebp - 0x28]
push 0x46a0d8
push eax
mov dword [ebp - 0x28], str.Incorrect_mapping_data
call fcn.00457cfd
shr esi, 1
push 0xf
lea ecx, [ebp - 0x40]
mov dword [ebp + 0xc], esi
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
call fcn.004014fb
push 1
mov byte [ebp - 4], 6
pop esi
cmp esi, dword [ebp + 0xc]
jae 0x40bd20
mov ax, word [edi + esi*2]
cmp ax, bx
jne 0x40bd14
push dword [ebp + 0x14]
lea eax, [ebp - 0x40]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.0040b7b1
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], ebx
mov word [eax], bx
jmp 0x40bd1d
push eax
lea ecx, [ebp - 0x40]
call fcn.004054aa
inc esi
jmp 0x40bce9
cmp dword [ebp - 0x3c], ebx
je 0x40bd3a
lea eax, [ebp - 0x2c]
push 0x46a0d8
push eax
mov dword [ebp - 0x2c], 0x474358
call fcn.00457cfd
push dword [ebp - 0x40]
call fcn.00405c78
pop ecx
mov dword [ebp - 4], 4
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x14], ebx
mov byte [ebp - 4], 3
je 0x40bd63
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp + 0xc]
call fcn.0040be0c
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040bdf0
push dword [eax]
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
push dword [ebp - 0x40]
mov dword [ebp + 0xc], eax
call fcn.00405c78
pop ecx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [ebp + 0xc], ebx
je 0x40bdaa
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x58]
call fcn.00405c78
push dword [ebp - 0x64]
call fcn.00405c78
push dword [ebp - 0x4c]
call fcn.00405c78
push dword [ebp - 0x70]
call fcn.00405c78
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x10