Function at 0x517860
Capabilities:
Write clipboard data

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xfc
mov eax, dword [esp + 0x110]
mov edi, dword [eax + 0x51c]
jmp 0x517888
cmp dword [edi], 0x1f
je 0x51788c
mov edi, dword [edi + 0x10]
test edi, edi
jne 0x517880
xor ecx, ecx
test edi, edi
je 0x5178c6
mov esi, dword [edi + 8]
test esi, esi
je 0x5178c6
lea esi, [esi]
mov eax, dword [esi + 4]
mov edx, dword [esi]
add ecx, eax
lea ebx, [eax + edx]
jmp 0x5178bb
xor eax, eax
cmp byte [edx], 0xa
sete al
add ecx, eax
inc edx
cmp edx, ebx
jb 0x5178b0
mov esi, dword [esi + 8]
test esi, esi
jne 0x5178a0
lea eax, [ecx + 1]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x14]
test edi, edi
mov ecx, eax
mov ebp, eax
je 0x51791a
mov esi, dword [edi + 8]
test esi, esi
je 0x51791a
lea esi, [esi]
lea edi, [edi]
mov edx, dword [esi]
mov ebx, dword [esi + 4]
add ebx, edx
cmp edx, ebx
jae 0x517913
nop
lea esi, [esi]
movzx eax, byte [edx]
cmp al, 0xa
je 0x5179e0
mov byte [ecx], al
inc edx
inc ecx
cmp edx, ebx
jb 0x517900
mov esi, dword [esi + 8]
test esi, esi
jne 0x5178f0
mov byte [ecx], 0
call fcn.004d2fa0
cmp eax, 2
je 0x5179f0
mov dword [esp + 4], ebp
mov eax, dword [0x5ecbec]
lea esi, [esp + 0x10]
mov dword [esp + 0xc], esi
mov ebx, 0xffffffff
mov dword [esp + 8], ebx
mov dword [esp], 0
call dword [eax + 0x53c]
mov dword [esp], ebp
mov eax, dword [0x5ecbec]
call dword [eax + 0x18]
mov dword [esp], 0x2002
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 4], eax
call sub.KERNEL32.dll_GlobalAlloc
sub esp, 8
test eax, eax
mov ebx, eax
je 0x517a99
mov dword [esp], eax
call sub.KERNEL32.dll_GlobalLock
sub esp, 4
mov ecx, eax
mov eax, dword [esp + 0x14]
mov dword [esp], ecx
inc eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov dword [esp], ebx
call sub.KERNEL32.dll_GlobalUnlock
mov eax, dword [0x5ecbec]
sub esp, 4
mov dword [esp], esi
call dword [eax + 0x1e8]
mov dword [esp + 4], ebx
mov dword [esp], 1
call sub.USER32.dll_SetClipboardData
sub esp, 8
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [ecx], 0xd
inc ecx
movzx eax, byte [edx]
inc edx
mov byte [ecx], al
inc ecx
jmp 0x51790f
mov eax, dword [0x5ecbec]
lea esi, [esp + 0x10]
mov edi, 0xffffffff
mov dword [esp], esi
call dword [eax + 0x1f0]
mov dword [esp + 8], esi
mov eax, dword [0x5ecbec]
mov dword [esp + 4], edi
mov dword [esp], ebp
call dword [eax + 0x594]
mov dword [esp], ebp
mov eax, dword [0x5ecbec]
call dword [eax + 0x18]
mov dword [esp], 0x2002
mov eax, dword [esp + 0x14]
add eax, 2
mov dword [esp + 4], eax
call sub.KERNEL32.dll_GlobalAlloc
sub esp, 8
test eax, eax
mov ebx, eax
je 0x517a99
mov dword [esp], eax
call sub.KERNEL32.dll_GlobalLock
sub esp, 4
mov ecx, eax
mov eax, dword [esp + 0x14]
mov dword [esp], ecx
add eax, 2
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov dword [esp], ebx
call sub.KERNEL32.dll_GlobalUnlock
mov eax, dword [0x5ecbec]
sub esp, 4
mov dword [esp], esi
call dword [eax + 0x1e8]
mov dword [esp + 4], ebx
mov dword [esp], 0xd
jmp 0x5179c9
mov dword [esp], esi
mov eax, dword [0x5ecbec]
call dword [eax + 0x1e8]
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret