Function at 0x1015308
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 1
xor ebx, ebx
cmp dword [ebp + 0xc], edi
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], edi
je 0x1015349
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x101534f
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x1015648
push edi
push edi
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [ebp - 0x18], eax
je 0x1015648
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [ebp - 0x20], eax
je 0x1015648
cmp word [eax], 0x4d42
jne 0x10153ab
movzx edx, word [eax + 0xc]
movzx ecx, word [eax + 0xa]
shl edx, 0x10
or ecx, edx
lea esi, [eax + 0xe]
add ecx, eax
mov dword [ebp - 4], esi
mov dword [ebp - 8], ecx
jmp 0x10153b0
mov dword [ebp - 4], eax
mov esi, eax
push esi
call fcn.010152af
movzx eax, ax
mov dword [ebp - 0x14], eax
lea eax, [eax*4 + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, edi
je 0x1015614
movzx eax, word [esi + 2]
movzx ecx, word [esi]
shl eax, 0x10
or eax, ecx
cmp eax, 0xc
je 0x1015718
push 0x28
pop ecx
cmp eax, ecx
je 0x101540e
cmp byte [0x101b7e0], 0
je 0x1015648
push edi
push 0x10016b4
push 0x1001698
jmp 0x1015628
mov dword [ebx], ecx
lea edi, [ebx + 0x28]
movzx ecx, word [esi + 6]
movzx eax, word [esi + 4]
shl ecx, 0x10
or eax, ecx
add esi, 0x28
mov dword [ebx + 4], eax
movzx ecx, word [esi - 0x1e]
movzx eax, word [esi - 0x20]
shl ecx, 0x10
or eax, ecx
mov dword [ebx + 8], eax
mov ax, word [esi - 0x1c]
mov word [ebx + 0xc], ax
mov ax, word [esi - 0x1a]
mov word [ebx + 0xe], ax
movzx ecx, word [esi - 0x16]
movzx eax, word [esi - 0x18]
shl ecx, 0x10
or eax, ecx
mov dword [ebx + 0x10], eax
movzx ecx, word [esi - 0x12]
movzx eax, word [esi - 0x14]
shl ecx, 0x10
or eax, ecx
mov dword [ebx + 0x14], eax
movzx ecx, word [esi - 0xe]
movzx eax, word [esi - 0x10]
shl ecx, 0x10
or eax, ecx
mov dword [ebx + 0x18], eax
movzx ecx, word [esi - 0xa]
movzx eax, word [esi - 0xc]
shl ecx, 0x10
or eax, ecx
mov dword [ebx + 0x1c], eax
movzx ecx, word [esi - 6]
movzx eax, word [esi - 8]
shl ecx, 0x10
or eax, ecx
mov dword [ebx + 0x20], eax
movzx ecx, word [esi - 2]
movzx eax, word [esi - 4]
shl ecx, 0x10
or eax, ecx
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 8], 0
mov dword [ebx + 0x24], eax
rep movsd dword es:[edi], dword [esi]
jne 0x10154be
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
lea eax, [eax + ecx*4 + 0x28]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0x14]
xor edi, edi
cmp dword [ebx + 0x14], edi
jne 0x10154df
movzx eax, word [ebx + 0xe]
mov ecx, dword [ebx + 4]
imul ecx, eax
add ecx, 7
shr ecx, 3
imul ecx, dword [ebx + 8]
mov dword [ebx + 0x14], ecx
cmp dword [ebx + 0x20], edi
jne 0x10154e7
mov dword [ebx + 0x20], edx
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
cmp eax, edi
mov dword [ebp - 0x10], eax
je 0x1015614
push 0x2c
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x2c], esi
je 0x1015614
mov dword [esi], 0x28
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 8]
mov dword [esi + 8], eax
push edi
cdq
xor eax, edx
push edi
sub eax, edx
mov word [esi + 0xc], 1
imul eax, dword [esi + 4]
mov word [esi + 0xe], 0x18
mov dword [esi + 0x10], edi
lea eax, [eax + eax*2]
mov dword [esi + 0x14], eax
lea eax, [ebp - 0x30]
push eax
push edi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.GDI32.dll_CreateDIBSection]
cmp eax, edi
mov dword [ebp - 0x24], eax
je 0x1015614
push eax
push dword [ebp - 0x10]
call dword [sym.imp.GDI32.dll_SelectObject]
test eax, eax
je 0x1015614
push edi
push ebx
push dword [ebp - 8]
push dword [ebx + 8]
push edi
push dword [ebp - 0x24]
push dword [ebp - 0x10]
call dword [sym.imp.GDI32.dll_SetDIBits]
test eax, eax
jne 0x10155a3
cmp byte [0x101b7e0], al
je 0x1015648
push edi
push 0x10016b4
push 0x1001678
jmp 0x1015628
call dword [sym.imp.GDI32.dll_GdiFlush]
push dword [esi + 0x14]
call fcn.0100c3f0
mov esi, eax
pop ecx
cmp esi, edi
mov dword [ebp - 0x28], esi
je 0x1015614
mov ecx, dword [ebx + 4]
mov eax, dword [ebp - 0x30]
mov edx, ecx
mov dword [ebp - 8], edi
and edx, 3
cmp dword [ebx + 8], edi
mov dword [ebp - 0x1c], edx
jle 0x1015605
cmp ecx, edi
mov dword [ebp - 4], edi
jle 0x10155f7
mov cl, byte [eax + 2]
mov byte [esi], cl
mov cl, byte [eax + 1]
inc esi
mov byte [esi], cl
mov cl, byte [eax]
inc esi
add eax, 3
mov byte [esi], cl
mov ecx, dword [ebx + 4]
inc esi
inc dword [ebp - 4]
cmp dword [ebp - 4], ecx
jl 0x10155d8
add eax, dword [ebp - 0x1c]
inc dword [ebp - 8]
mov edx, dword [ebp - 8]
cmp edx, dword [ebx + 8]
jl 0x10155d1
push 0xc
call fcn.0100c3f0
cmp eax, edi
pop ecx
mov dword [ebp - 0x1c], eax
jne 0x1015637
cmp byte [0x101b7e0], 0
je 0x1015648
push edi
push 0x10016b4
push 0x1001668
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x1015648
mov ecx, dword [ebx + 4]
mov dword [eax], ecx
mov ecx, dword [ebx + 8]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x28]
mov dword [eax + 8], ecx
cmp dword [ebp - 0x10], edi
je 0x1015656
push dword [ebp - 0x10]
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp dword [ebp - 0x24], edi
je 0x1015664
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [ebp - 0x2c], edi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x1015674
push dword [ebp - 0x2c]
call esi
cmp ebx, edi
je 0x101567b
push ebx
call esi
cmp dword [ebp - 0x20], edi
je 0x1015689
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x18], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x1015699
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 0xc], 0xffffffff
je 0x10156a4
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 0x1c], edi
jne 0x101570e
cmp dword [ebp - 0x28], edi
je 0x10156b7
push dword [ebp - 0x28]
call fcn.0100c3a0
pop ecx
cmp dword [ebp - 0xc], 0xffffffff
je 0x10156c7
cmp dword [ebp - 0x18], edi
je 0x10156c7
cmp dword [ebp - 0x20], edi
jne 0x101570e
cmp dword [ebp + 0xc], edi
push dword [ebp + 8]
je 0x10156d6
push 0x1001cc8
jmp 0x10156db
push 0x1001ca8
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp byte [0x101b7e0], 0
je 0x101570e
push edi
lea eax, [ebp - 0x130]
push 0x10016b4
push eax
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
leave
ret 8
mov dword [ebx], 0x28
mov edx, dword [ebp - 0x14]
movzx eax, word [esi + 4]
mov dword [ebx + 4], eax
cmp edx, edi
movzx eax, word [esi + 6]
mov dword [ebx + 8], eax
mov ax, word [esi + 8]
mov word [ebx + 0xc], ax
mov ax, word [esi + 0xa]
mov word [ebx + 0xe], ax
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x20], edx
mov dword [ebx + 0x24], edx
lea eax, [ebx + 0x28]
lea ecx, [esi + 0xc]
jle 0x1015780
mov dword [ebp - 4], edx
mov dl, byte [ecx + 2]
mov byte [eax + 2], dl
mov dl, byte [ecx + 1]
mov byte [eax + 1], dl
mov dl, byte [ecx]
and byte [eax + 3], 0
mov byte [eax], dl
add eax, 4
add ecx, 3
dec dword [ebp - 4]
jne 0x101575e
mov edx, dword [ebp - 0x14]
cmp dword [ebp - 8], edi
jne 0x10154c3
lea eax, [esi + edx*2]
lea eax, [edx + eax + 0x28]
mov dword [ebp - 8], eax
jmp 0x10154c3