Function at 0x4123d8
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc
push ebx
push esi
push edi
push 0
lea eax, [ebp - 0x8c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0xffffffff
jne 0x412413
mov eax, 0xfffffffe
jmp 0x412794
push 0
push dword [ebp - 0xb8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xb4]
add eax, 0xa
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
jne 0x412462
push dword [ebp - 0xb8]
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 0xffffffff
jmp 0x412794
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0xb0], eax
push dword [ebp - 0xb4]
push dword [ebp - 0xb0]
push dword [ebp - 0xb8]
call dword [sym.imp.KERNEL32.dll__hread]
push dword [ebp - 0xb8]
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0xb0]
movsx eax, byte [eax]
cmp eax, 0x42
jne 0x4124c9
mov eax, dword [ebp - 0xb0]
movsx eax, byte [eax + 1]
cmp eax, 0x4d
je 0x4124eb
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xfffffff8
jmp 0x412794
sub dword [ebp - 0xb4], 0xe
mov dword [ebp - 0xa8], 0
jmp 0x412507
inc dword [ebp - 0xa8]
mov eax, dword [ebp - 0xb4]
cmp dword [ebp - 0xa8], eax
jae 0x41253d
mov eax, dword [ebp - 0xa8]
mov ecx, dword [ebp - 0xb0]
mov al, byte [eax + ecx + 0xe]
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ebp - 0xb0]
mov byte [ecx + edx], al
jmp 0x412501
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xa4]
cmp dword [eax + 0x10], 0
je 0x41257b
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xfffffff0
jmp 0x412794
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], 0
mov eax, dword [ebp - 0xa4]
movzx eax, word [eax + 0xe]
mov dword [ebp - 0xbc], eax
jmp 0x412620
mov dword [ebp - 0xac], 8
jmp 0x412659
mov dword [ebp - 0xac], 0x40
jmp 0x412659
mov dword [ebp - 0xac], 0x400
jmp 0x412659
mov dword [ebp - 0xac], 0
jmp 0x412659
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xfffffff8
jmp 0x412794
cmp dword [ebp - 0xbc], 1
je 0x4125b8
cmp dword [ebp - 0xbc], 4
je 0x4125c7
cmp dword [ebp - 0xbc], 8
je 0x4125d6
cmp dword [ebp - 0xbc], 0x18
je 0x4125e5
jmp 0x4125f4
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax]
add eax, dword [ebp - 0x90]
add eax, dword [ebp - 0xac]
mov dword [ebp - 0x90], eax
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], 0
push 0xc
push dword [ebp - 0xa0]
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
cmp eax, 8
jne 0x4126b8
mov dword [ebp - 0x9c], 1
mov eax, dword [ebp - 0xa4]
movzx eax, word [eax + 0xe]
cmp eax, 8
jne 0x41270f
cmp dword [ebp - 0x9c], 0
je 0x41270f
push dword [ebp - 0xa4]
call fcn.0041279b
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], eax
push 0
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
push dword [ebp - 0xa0]
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [ebp - 4], eax
push dword [ebp - 0xa0]
call dword [sym.imp.GDI32.dll_RealizePalette]
push 0
push dword [ebp - 0xa4]
push dword [ebp - 0x90]
push 4
push dword [ebp - 0xa4]
push dword [ebp - 0xa0]
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 0xa4]
movzx eax, word [eax + 0xe]
cmp eax, 8
jne 0x412767
cmp dword [ebp - 0x9c], 0
je 0x412767
push 0
push dword [ebp - 4]
push dword [ebp - 0xa0]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp - 0xa0]
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x412794
pop edi
pop esi
pop ebx
leave
ret 8