Function at 0x40ffb0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x451270]
xor eax, esp
mov dword [esp + 0x50], eax
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
mov ebx, ecx
je 0x40ffdb
lea eax, [ebp + 8]
push eax
lea ecx, [ebx + 0x18]
call fcn.00410580
cmp byte [ebx + 1], 0
jne 0x40fff7
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00421184
mov esp, ebp
pop ebp
ret 4
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x41001a
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00421184
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0
push eax
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push dword [esp + 0x2c]
push 1
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
jne 0x41004b
xor bl, bl
jmp 0x410297
cmp dword [ebx + 0x28], 0
je 0x410290
mov esi, dword [ebx + 0x18]
mov edx, dword [ebx + 0x24]
test esi, esi
je 0x410061
mov esi, dword [esi]
mov eax, dword [esi + 8]
mov ecx, edx
mov esi, dword [esi + 4]
dec eax
shr ecx, 2
and edx, 3
and ecx, eax
mov esi, dword [esi + ecx*4]
mov esi, dword [esi + edx*4]
dec dword [ebx + 0x28]
jne 0x410086
mov dword [ebx + 0x24], 0
jmp 0x410089
inc dword [ebx + 0x24]
push 0x2c
lea eax, [esp + 0x34]
push 0
push eax
call fcn.00421940
xor eax, eax
mov dword [esp + 0x50], 7
add esp, 0xc
mov dword [esp + 0x40], 0
lea ecx, [esp + 0x14]
mov word [esp + 0x30], ax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
push eax
push 0x448dc8
mov dword [esp + 0x58], eax
mov byte [esp + 0x5c], al
mov dword [esp + 0x60], eax
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], eax
mov word [esp + 0x1c], ax
call fcn.00401ad0
mov eax, dword [esi + 4]
lea ecx, [esp + 0x30]
push 0xffffffffffffffff
push 0
mov eax, dword [eax]
add eax, dword [esi + 8]
mov dword [esp + 0x18], eax
add eax, 0xffff
and eax, 0xffff0000
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push eax
call fcn.00401da0
cmp dword [esp + 0x24], 0
mov byte [esp + 0x54], 0
jne 0x410121
xor eax, eax
jmp 0x41012f
cmp dword [esp + 0x28], 8
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
push eax
push dword [esp + 0x10]
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, eax
mov dword [esp + 0x48], ecx
test ecx, ecx
je 0x41015e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x58], eax
cmp dword [esp + 0x28], 8
jb 0x410175
push dword [esp + 0x14]
call fcn.00420949
mov ecx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [esi + 4]
mov eax, dword [eax]
add eax, dword [esi + 8]
test ecx, ecx
je 0x4101a8
cmp byte [esp + 0x54], 0
mov edx, 4
push eax
push 0
push 0
mov eax, 0xf001f
cmovne eax, edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
mov dword [esp + 0x50], edx
jmp 0x4101ac
mov edx, dword [esp + 0x50]
mov eax, dword [esi + 4]
mov eax, dword [eax]
add eax, dword [esi + 8]
cmp dword [esp + 0x58], eax
jb 0x4102b4
test edx, edx
je 0x4102b4
push eax
push dword [esi + 4]
push eax
push edx
call fcn.00423f73
add esp, 0xc
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
lea ecx, [esp + 0x34]
push eax
push edi
call fcn.00418810
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4102b4
mov eax, dword [esi + 4]
mov eax, dword [eax]
add eax, dword [esi + 8]
push eax
push ecx
push 0x8065
push dword [ebx + 0x10]
call dword [sym.imp.USER32.dll_PostMessageW]
test eax, eax
je 0x4102b4
mov eax, dword [esp + 0x50]
test eax, eax
je 0x41022e
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esp + 0x50], 0
mov eax, dword [esp + 0x48]
test eax, eax
je 0x410245
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x410254
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x44], 8
jb 0x410267
push dword [esp + 0x30]
call fcn.00420949
add esp, 4
xor eax, eax
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], 0
mov ecx, esi
mov word [esp + 0x30], ax
mov eax, dword [esi]
push 1
call dword [eax]
cmp dword [ebx + 0x28], 0
jne 0x410055
mov bl, 1
cmp edi, 0xffffffff
je 0x41029e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x5c]
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00421184
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x30]
call fcn.0040fdf0
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
xor bl, bl
jmp 0x410292