Function at 0x1005008
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x1010b74]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
xor edi, edi
inc ebx
push 0xb
mov dword [ebp - 4], eax
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x54], edi
call fcn.01001f10
test eax, eax
je 0x1005070
xor esi, esi
cmp dword [0x1010f5c], esi
je 0x1005050
call dword [sym.imp.USER32.dll_CloseClipboard]
mov dword [0x1010f5c], esi
mov eax, dword [0x1010c1c]
cmp eax, esi
je 0x10053f3
push esi
push esi
push 0x308
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x10053f3
cmp dword [esi + 4], 4
jb 0x10053f3
cmp dword [0x1010f5c], 0
mov esi, dword [esi + 8]
jne 0x100509a
push dword [0x1010bf0]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x10053f3
push esi
mov dword [0x1010f5c], ebx
call dword [sym.imp.USER32.dll_GetClipboardData]
test eax, eax
mov dword [ebp - 0x5c], eax
je 0x1005137
cmp esi, 9
jne 0x1005124
lea ecx, [ebp - 0x54]
push ecx
push 2
pop edi
push edi
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
jne 0x10050d1
mov dword [ebp - 0x54], 0x100
movzx esi, word [ebp - 0x54]
lea eax, [esi*4 + 4]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x10050f0
mov dword [ebp - 0x58], edi
jmp 0x100513e
push ebx
mov dword [ebp - 0x60], ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
push esi
push 0
push dword [ebp - 0x5c]
call dword [sym.imp.GDI32.dll_GetPaletteEntries]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
test esi, esi
jne 0x1005117
mov dword [ebp - 0x58], edi
mov edi, esi
shl edi, 2
mov dword [ebp - 0x5c], ebx
jmp 0x10053d2
cmp esi, 3
jne 0x1005153
lea ecx, [ebp - 0x54]
push ecx
push eax
call fcn.0100481c
test eax, eax
jne 0x1005145
mov dword [ebp - 0x58], 2
xor edi, edi
jmp 0x10053d2
mov edi, dword [ebp - 0x54]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
jmp 0x10053d2
cmp esi, 0xf
jne 0x1005283
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call ebx
cmp dword [0x10115f8], 0
mov esi, eax
mov edi, dword [esi + 0x10]
mov dword [ebp - 0x54], edi
jne 0x100518f
mov eax, dword [esi]
add eax, esi
push edi
push eax
call fcn.01004afe
test eax, eax
mov dword [0x10115f8], 1
jne 0x1005137
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push edi
push eax
push esi
call fcn.01004ad8
push eax
push 0x102
mov dword [ebp - 0x68], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp - 0x64], eax
je 0x1005137
push eax
mov dword [ebp - 0x60], eax
call ebx
mov ebx, eax
test ebx, ebx
je 0x1005137
mov eax, dword [esi]
mov dword [ebx], eax
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
mov eax, dword [esi + 8]
mov dword [ebx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x10], eax
mov edi, dword [esi]
add edi, esi
mov esi, dword [ebx]
add esi, ebx
xor ecx, ecx
xor eax, eax
cmp dword [ebp - 0x54], ecx
je 0x10051f8
cmp word [edi], cx
jmp 0x10051fb
cmp byte [edi], 0
setne al
cmp eax, ecx
je 0x1005263
mov eax, esi
sub eax, ebx
cmp eax, dword [ebp - 0x68]
ja 0x100521d
push dword [ebp - 0x54]
mov eax, ebx
sub eax, esi
add eax, dword [ebp - 0x68]
push eax
push esi
push edi
call fcn.01004f90
cmp dword [ebp - 0x54], 0
je 0x100523d
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
push esi
lea edi, [edi + eax*2 + 2]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jmp 0x10051ea
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1005242
sub eax, ecx
lea edi, [edi + eax + 1]
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1005254
sub eax, ecx
lea esi, [esi + eax + 1]
jmp 0x10051ea
cmp dword [ebp - 0x54], ecx
je 0x100526d
mov word [esi], cx
jmp 0x1005270
mov byte [esi], 0
mov esi, dword [ebp - 0x64]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [ebp - 0x5c], esi
push esi
jmp 0x10053ca
push 0x20
lea eax, [ebp - 0x44]
push eax
push esi
call dword [sym.imp.USER32.dll_GetClipboardFormatNameW]
test eax, eax
je 0x10053c7
mov esi, dword [sym.imp.msvcrt.dll_wcscmp]
lea eax, [ebp - 0x44]
push 0x1004fc6
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x10052c4
lea eax, [ebp - 0x44]
push 0x1004fda
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10053c7
lea eax, [ebp - 0x44]
push 0x1004fee
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10052dc
mov dword [ebp - 0x54], ebx
mov bl, 2
jmp 0x10052e2
and dword [ebp - 0x54], 0
mov bl, 1
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
test edi, edi
mov dword [ebp - 0x64], edi
je 0x1005137
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GlobalSize]
cmp dword [0x10115f8], 0
jne 0x100536c
movzx ecx, bl
add ecx, eax
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp dword [ebp - 0x54], 0
mov esi, eax
je 0x1005336
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
push 0x3a
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 0x10
jmp 0x1005351
mov edx, esi
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x100533c
push 0x3a
push esi
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
push dword [ebp - 0x54]
push esi
call fcn.01004afe
test eax, eax
mov dword [0x10115f8], 1
jne 0x1005137
push dword [ebp - 0x54]
push edi
call fcn.01004ab4
mov edi, eax
push edi
push 0x102
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x1005137
push esi
mov dword [ebp - 0x60], esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x1005137
push dword [ebp - 0x54]
push edi
push eax
push dword [ebp - 0x64]
call fcn.01004f90
test eax, eax
jl 0x1005137
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x5c], esi
jmp 0x10053d2
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov edi, eax
cmp dword [ebp - 0x5c], 0
je 0x10053fa
test edi, edi
je 0x10053fa
lea eax, [edi + 0xc]
push eax
push 0
mov dword [ebp - 0x54], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x1005404
xor edi, edi
mov dword [ebp - 0x58], 2
lea ebx, [ebp - 0x50]
mov dword [ebp - 0x54], 0xc
test edi, edi
mov ax, word [ebp - 0x58]
mov word [ebx], 5
mov word [ebx + 2], ax
mov dword [ebx + 4], edi
je 0x100543f
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push dword [ebp - 0x5c]
mov ecx, edi
mov esi, eax
mov eax, ecx
shr ecx, 2
lea edi, [ebx + 8]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
push dword [ebp - 0x54]
and dword [0x1010f5c], 0
push ebx
call fcn.010047c0
lea eax, [ebp - 0x50]
cmp ebx, eax
je 0x1005463
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x60], 0
pop edi
pop esi
pop ebx
je 0x1005475
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 4]
call fcn.010090ab
leave
ret 4