Function at 0x100d812
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0x12c
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebp, ebp
cmp dword [esp + 0x144], edi
push edi
push edi
push 3
push edi
push 1
mov dword [esp + 0x40], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x48], edi
push 0x80000000
je 0x100d860
push dword [esp + 0x158]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x100d86d
push dword [esp + 0x158]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x100dba9
push edi
push edi
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [esp + 0x28], eax
je 0x100dba9
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [esp + 0x30], eax
je 0x100dba9
cmp word [eax], 0x4d42
jne 0x100d8ca
movzx ecx, word [eax + 0xc]
movzx edx, word [eax + 0xa]
shl ecx, 0x10
or ecx, edx
lea ebx, [eax + 0xe]
add ecx, eax
mov dword [esp + 0x18], ecx
jmp 0x100d8cc
mov ebx, eax
push ebx
call fcn.0100d7bc
movzx esi, ax
mov dword [esp + 0x10], esi
lea eax, [esi*4 + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
cmp ebp, edi
jne 0x100d908
cmp byte [0x10106f8], 0
je 0x100dba9
push edi
push 0x1001b58
push 0x1001b0c
jmp 0x100d93c
movzx eax, word [ebx + 2]
movzx ecx, word [ebx]
shl eax, 0x10
or eax, ecx
cmp eax, 0xc
je 0x100dc8f
push 0x28
pop ecx
cmp eax, ecx
je 0x100d94e
cmp byte [0x10106f8], 0
je 0x100dba9
push edi
push 0x1001b58
push 0x1001b3c
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x100dba9
mov dword [ebp], ecx
lea edi, [ebp + 0x28]
movzx eax, word [ebx + 6]
movzx ecx, word [ebx + 4]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 4], eax
movzx eax, word [ebx + 0xa]
movzx ecx, word [ebx + 8]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 8], eax
mov ax, word [ebx + 0xc]
mov word [ebp + 0xc], ax
mov ax, word [ebx + 0xe]
mov word [ebp + 0xe], ax
movzx eax, word [ebx + 0x12]
movzx ecx, word [ebx + 0x10]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x10], eax
movzx eax, word [ebx + 0x16]
movzx ecx, word [ebx + 0x14]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x14], eax
movzx eax, word [ebx + 0x1a]
movzx ecx, word [ebx + 0x18]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x18], eax
movzx eax, word [ebx + 0x1e]
movzx ecx, word [ebx + 0x1c]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x1c], eax
movzx eax, word [ebx + 0x22]
movzx ecx, word [ebx + 0x20]
shl eax, 0x10
or eax, ecx
mov dword [ebp + 0x20], eax
movzx eax, word [ebx + 0x26]
movzx ecx, word [ebx + 0x24]
shl eax, 0x10
or eax, ecx
cmp dword [esp + 0x18], 0
mov ecx, esi
lea esi, [ebx + 0x28]
mov dword [ebp + 0x24], eax
rep movsd dword es:[edi], dword [esi]
jne 0x100d9fe
mov eax, dword [esp + 0x10]
lea eax, [ebx + eax*4 + 0x28]
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x10]
xor eax, eax
cmp dword [ebp + 0x14], eax
jne 0x100da20
movzx ecx, word [ebp + 0xe]
mov edx, dword [ebp + 4]
imul edx, ecx
add edx, 7
shr edx, 3
imul edx, dword [ebp + 8]
mov dword [ebp + 0x14], edx
cmp dword [ebp + 0x20], eax
jne 0x100da28
mov dword [ebp + 0x20], esi
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
xor edi, edi
cmp ebx, edi
mov dword [esp + 0x14], ebx
jne 0x100da4e
cmp byte [0x10106f8], 0
je 0x100dba7
push edi
jmp 0x100db7c
push 0x2c
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x34], esi
je 0x100db0d
mov dword [esi], 0x28
mov eax, dword [ebp + 4]
mov dword [esi + 4], eax
mov eax, dword [ebp + 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, [esp + 0x40]
push eax
push edi
push esi
push ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebx, eax
cmp ebx, edi
mov dword [esp + 0x24], ebx
je 0x100db0d
push ebx
push dword [esp + 0x18]
call dword [sym.imp.GDI32.dll_SelectObject]
test eax, eax
je 0x100db0d
push edi
push ebp
push dword [esp + 0x20]
push dword [ebp + 8]
push edi
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.GDI32.dll_SetDIBits]
test eax, eax
jne 0x100daf4
cmp byte [0x10106f8], al
je 0x100dba7
push edi
push 0x1001b58
push 0x1001b1c
jmp 0x100db86
call dword [sym.imp.GDI32.dll_GdiFlush]
push dword [esi + 0x14]
call sub.MSVCRT.dll_malloc
pop ecx
mov ecx, eax
cmp ecx, edi
mov dword [esp + 0x20], ecx
jne 0x100db1c
cmp byte [0x10106f8], 0
je 0x100dba7
jmp 0x100db7b
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x38]
mov esi, edx
mov dword [esp + 0x10], edi
and esi, 3
cmp dword [ebp + 8], edi
jle 0x100db62
xor ebx, ebx
cmp edx, edi
jle 0x100db53
mov dl, byte [eax + 2]
mov byte [ecx], dl
mov dl, byte [eax + 1]
inc ecx
mov byte [ecx], dl
mov dl, byte [eax]
inc ecx
add eax, 3
mov byte [ecx], dl
mov edx, dword [ebp + 4]
inc ecx
inc ebx
cmp ebx, edx
jl 0x100db37
add eax, esi
inc dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
cmp ebx, dword [ebp + 8]
jl 0x100db31
push 0xc
call sub.MSVCRT.dll_malloc
cmp eax, edi
pop ecx
mov dword [esp + 0x2c], eax
jne 0x100db95
cmp byte [0x10106f8], 0
je 0x100dba7
push edi
push 0x1001b58
push 0x1001b0c
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x100dba7
mov ecx, dword [ebp + 4]
mov dword [eax], ecx
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x20]
mov dword [eax + 8], ecx
xor edi, edi
cmp dword [esp + 0x14], edi
je 0x100dbb9
push dword [esp + 0x14]
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp dword [esp + 0x24], edi
je 0x100dbc9
push dword [esp + 0x24]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [esp + 0x34], edi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x100dbdb
push dword [esp + 0x34]
call esi
cmp ebp, edi
je 0x100dbe2
push ebp
call esi
mov edi, dword [esp + 0x30]
test edi, edi
je 0x100dbf1
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ebp, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x100dc02
push ebp
call esi
mov ebx, dword [esp + 0x1c]
cmp ebx, 0xffffffff
je 0x100dc0e
push ebx
call esi
xor esi, esi
cmp dword [esp + 0x2c], esi
jne 0x100dc7e
cmp dword [esp + 0x20], esi
je 0x100dc26
push dword [esp + 0x20]
call sub.MSVCRT.dll_free
pop ecx
cmp ebx, 0xffffffff
je 0x100dc33
cmp ebp, esi
je 0x100dc33
cmp edi, esi
jne 0x100dc7e
cmp dword [esp + 0x144], esi
push dword [esp + 0x140]
je 0x100dc4a
push 0x1001d44
jmp 0x100dc4f
push 0x1001d24
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
cmp byte [0x10106f8], 0
je 0x100dc7e
push esi
lea eax, [esp + 0x40]
push 0x1001b58
push eax
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c
ret 8
mov dword [ebp], 0x28
movzx eax, word [ebx + 4]
mov dword [ebp + 4], eax
movzx eax, word [ebx + 6]
mov dword [ebp + 8], eax
mov ax, word [ebx + 8]
mov word [ebp + 0xc], ax
mov ax, word [ebx + 0xa]
mov word [ebp + 0xe], ax
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x14], edi
mov dword [ebp + 0x18], edi
mov dword [ebp + 0x1c], edi
mov dword [ebp + 0x20], esi
test esi, esi
mov dword [ebp + 0x24], esi
lea eax, [ebp + 0x28]
lea edi, [ebx + 0xc]
jle 0x100dcef
mov ecx, esi
mov dl, byte [edi + 2]
mov byte [eax + 2], dl
mov dl, byte [edi + 1]
mov byte [eax + 1], dl
mov dl, byte [edi]
and byte [eax + 3], 0
mov byte [eax], dl
add eax, 4
add edi, 3
dec ecx
jne 0x100dcd2
cmp dword [esp + 0x18], 0
jne 0x100da02
lea eax, [ebx + esi*2]
lea eax, [esi + eax + 0x28]
mov dword [esp + 0x18], eax
jmp 0x100da02