Function at 0x1006424
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 0xc000
push edi
jb 0x1006446
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.USER32.dll_RegisterClipboardFormatW]
mov dword [esi], eax
mov eax, dword [esi]
dec eax
dec eax
je 0x1006463
xor ebx, ebx
dec eax
jne 0x1006473
cmp dword [0x1009a98], ebx
setne bl
lea ebx, [ebx*8 + 8]
jmp 0x1006473
mov ebx, dword [0x1009a98]
neg ebx
sbb ebx, ebx
and ebx, 0xa
add ebx, 0xe
mov eax, dword [esi + 4]
sub eax, ebx
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp + 8], edi
jne 0x100649a
push 0x100248c
call fcn.01004c8a
pop ecx
jmp 0x100652f
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
mov dword [ebp - 8], eax
jne 0x10064bc
push 0x1002464
call fcn.01004c8a
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x100652f
mov edi, dword [esi + 8]
add edi, ebx
push edi
lea eax, [esi + 0xc]
push eax
push 0x100243c
call fcn.01004c8a
add esp, 0xc
push 0
push 0
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [esi + 4]
sub eax, ebx
push eax
push dword [ebp - 8]
push dword [ebp + 0xc]
call edi
mov eax, dword [esi + 4]
mov ecx, eax
sub ecx, ebx
cmp ecx, dword [ebp - 4]
je 0x1006536
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 4]
mov eax, dword [esi + 4]
sub eax, ebx
push eax
push 0x1002408
call fcn.01004c8a
add esp, 0xc
xor eax, eax
jmp 0x1006695
mov ecx, dword [esi]
dec ecx
dec ecx
je 0x1006635
dec ecx
je 0x1006578
sub ecx, 6
je 0x100656a
sub ecx, 5
je 0x100655b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x1006692
push dword [ebp - 8]
push eax
call dword [sym.imp.GDI32.dll_SetEnhMetaFileBits]
jmp 0x100667b
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_CreatePalette]
jmp 0x100667b
push dword [ebp - 8]
push eax
call dword [sym.imp.GDI32.dll_SetMetaFileBitsEx]
push dword [ebp + 8]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp + 8], 0
cmp dword [ebp - 8], 0
je 0x1006692
push 0x10
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x1006692
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
jne 0x10065d5
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1006692
push 0
push 0
push dword [esi + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
cmp dword [0x1009a98], eax
push eax
lea eax, [ebp - 4]
push eax
je 0x10065fe
push 0x10
push ebx
push dword [ebp + 0xc]
call edi
jmp 0x1006623
push 8
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0xc]
call edi
cmp dword [ebp - 4], 8
jne 0x1006623
movzx eax, word [ebp - 0x18]
mov dword [ebx], eax
movzx eax, word [ebp - 0x16]
mov dword [ebx + 4], eax
movzx eax, word [ebp - 0x14]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
push esi
mov dword [ebx + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x100668f
xor ebx, ebx
push ebx
push ebx
push dword [esi + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x1009a98], ebx
lea eax, [ebp - 4]
push ebx
push eax
je 0x100669c
push 0x18
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x100666b
push 6
xor eax, eax
lea edi, [ebp - 0x34]
pop ecx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.GDI32.dll_CreateBitmapIndirect]
push dword [ebp + 8]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp + 8], esi
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 8
push 0xe
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 0xc]
call edi
test eax, eax
je 0x1006661
movzx eax, word [ebp - 0x1c]
mov dword [ebp - 0x34], eax
movzx eax, word [ebp - 0x1a]
mov dword [ebp - 0x30], eax
movzx eax, word [ebp - 0x18]
mov dword [ebp - 0x2c], eax
movzx eax, word [ebp - 0x16]
mov dword [ebp - 0x28], eax
movzx ax, byte [ebp - 0x14]
mov word [ebp - 0x24], ax
movzx ax, byte [ebp - 0x13]
mov word [ebp - 0x22], ax
jmp 0x100666b