Function at 0x100623d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 0xc000
push edi
jb 0x100625d
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 0x100627a
xor ebx, ebx
dec eax
jne 0x100628a
cmp dword [0x1008a78], ebx
setne bl
lea ebx, [ebx*8 + 8]
jmp 0x100628a
mov ebx, dword [0x1008a78]
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 0x10062b1
push 0x1002480
call fcn.01004bf7
pop ecx
jmp 0x1006346
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
mov dword [ebp - 8], eax
jne 0x10062d3
push 0x1002458
call fcn.01004bf7
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1006346
mov edi, dword [esi + 8]
add edi, ebx
push edi
lea eax, [esi + 0xc]
push eax
push 0x1002430
call fcn.01004bf7
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 0x100634d
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 0x10023fc
call fcn.01004bf7
add esp, 0xc
xor eax, eax
jmp 0x10064ac
mov ecx, dword [esi]
dec ecx
dec ecx
je 0x100644c
dec ecx
je 0x100638f
sub ecx, 6
je 0x1006381
sub ecx, 5
je 0x1006372
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x10064a9
push dword [ebp - 8]
push eax
call dword [sym.imp.GDI32.dll_SetEnhMetaFileBits]
jmp 0x1006492
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_CreatePalette]
jmp 0x1006492
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 0x10064a9
push 0x10
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x10064a9
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
jne 0x10063ec
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x10064a9
push 0
push 0
push dword [esi + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
cmp dword [0x1008a78], eax
push eax
lea eax, [ebp - 4]
push eax
je 0x1006415
push 0x10
push ebx
push dword [ebp + 0xc]
call edi
jmp 0x100643a
push 8
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0xc]
call edi
cmp dword [ebp - 4], 8
jne 0x100643a
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 0x10064a6
xor ebx, ebx
push ebx
push ebx
push dword [esi + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x1008a78], ebx
lea eax, [ebp - 4]
push ebx
push eax
je 0x10064b3
push 0x18
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x1006482
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 0x1006478
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 0x1006482