Function at 0x1010943
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 0x1010965
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 0x1010982
xor ebx, ebx
dec eax
jne 0x1010992
cmp dword [0x101418c], ebx
setne bl
lea ebx, [ebx*8 + 8]
jmp 0x1010992
mov ebx, dword [0x101418c]
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 0x10109b9
push 0x10036d4
call fcn.0100eda2
pop ecx
jmp 0x1010a4e
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
mov dword [ebp - 8], eax
jne 0x10109db
push 0x10036ac
call fcn.0100eda2
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1010a4e
mov edi, dword [esi + 8]
add edi, ebx
push edi
lea eax, [esi + 0xc]
push eax
push 0x1003684
call fcn.0100eda2
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 0x1010a55
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 0x1003650
call fcn.0100eda2
add esp, 0xc
xor eax, eax
jmp 0x1010bb4
mov ecx, dword [esi]
dec ecx
dec ecx
je 0x1010b54
dec ecx
je 0x1010a97
sub ecx, 6
je 0x1010a89
sub ecx, 5
je 0x1010a7a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x1010bb1
push dword [ebp - 8]
push eax
call dword [sym.imp.GDI32.dll_SetEnhMetaFileBits]
jmp 0x1010b9a
push dword [ebp - 8]
call dword [sym.imp.GDI32.dll_CreatePalette]
jmp 0x1010b9a
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 0x1010bb1
push 0x10
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x1010bb1
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
jne 0x1010af4
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1010bb1
push 0
push 0
push dword [esi + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
cmp dword [0x101418c], eax
push eax
lea eax, [ebp - 4]
push eax
je 0x1010b1d
push 0x10
push ebx
push dword [ebp + 0xc]
call edi
jmp 0x1010b42
push 8
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0xc]
call edi
cmp dword [ebp - 4], 8
jne 0x1010b42
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 0x1010bae
xor ebx, ebx
push ebx
push ebx
push dword [esi + 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [0x101418c], ebx
lea eax, [ebp - 4]
push ebx
push eax
je 0x1010bbb
push 0x18
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x1010b8a
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 0x1010b80
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 0x1010b8a