Function at 0x498580
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x1c]
test eax, eax
push ebp
push esi
mov esi, dword [esp + 0x14]
mov ebp, edx
push edi
mov dword [esp + 0xc], ebp
jne 0x4985a3
mov edi, 1
mov dword [esp + 0x24], edi
jmp 0x49860b
mov eax, dword [esi + 8]
test eax, eax
jne 0x4985c8
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push 1
push eax
push edx
mov edx, dword [ebp]
push esi
call fcn.004ed570
pop edi
pop esi
pop ebp
add esp, 8
ret 0x14
mov eax, dword [esi + 0x40]
test eax, eax
je 0x4987a2
cmp dword [eax + 0x1c], 1
je 0x4985e7
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 8
ret 0x14
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x49876f
mov eax, dword [eax]
push eax
call fcn.00563a6c
add esp, 4
test eax, eax
mov dword [esp + 0x24], eax
jl 0x49876f
mov edi, eax
mov ecx, dword [0x5a1b00]
push ecx
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x49876f
push 1
call dword [sym.imp.USER32.dll_GetClipboardData]
test eax, eax
mov dword [esp + 0x10], eax
je 0x498769
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
je 0x49875d
mov edx, dword [esp + 0x20]
mov byte [edx], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x498650
sub eax, edx
push 0xa
push ebx
mov dword [esp + 0x2c], eax
call fcn.00563730
mov ebp, 1
add esp, 8
cmp edi, ebp
mov esi, eax
je 0x498699
test esi, esi
je 0x4986e0
mov al, byte [esi + 1]
inc esi
cmp al, 0xd
jne 0x498680
inc esi
cmp byte [esi], 0
je 0x4986e0
push 0xa
push esi
mov ebx, esi
call fcn.00563730
add esp, 8
inc ebp
cmp ebp, edi
mov esi, eax
jne 0x498673
test esi, esi
je 0x4986a0
mov byte [esi], 0
mov edi, dword [esp + 0x20]
xor eax, eax
mov ecx, 0xf9
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x3b5
stosb byte es:[edi], al
mov edi, dword [esp + 0x24]
push ebx
push edi
call fcn.005635f0
add esp, 0xc
test esi, esi
je 0x4986ca
mov byte [esi], 0xa
push 0xd
push edi
call fcn.00563730
mov edi, dword [esp + 0x30]
add esp, 8
test eax, eax
je 0x4986e0
mov byte [eax], 0
test edi, edi
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [esp + 0x20]
jne 0x4986fa
push ebp
push 0x5748f8
push esi
call ebx
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x498755
mov ecx, eax
mov edx, dword [ecx]
push 0x2e
push edx
call fcn.00563c90
add esp, 8
test eax, eax
je 0x498755
push str..len
push eax
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x498752
test edi, edi
je 0x498740
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x498733
sub eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
push eax
push 0x5748f8
push esi
call ebx
add esp, 0xc
jmp 0x498755
mov byte [esi], 0
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
pop ebx
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4987a2
mov eax, dword [esi + 8]
test eax, eax
jle 0x49879b
mov edi, edi
mov edx, dword [esi + 0x40]
mov ecx, dword [ebp]
call fcn.004c2730
mov dword [ebp], eax
mov ecx, dword [esi + 8]
dec ecx
mov eax, ecx
test eax, eax
mov dword [esi + 8], ecx
jg 0x498780
mov dword [esi + 8], 0
pop edi
pop esi
mov eax, 2
pop ebp
add esp, 8
ret 0x14