Function at 0x405150
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0x114
push ebx
push ebp
push esi
xor esi, esi
cmp eax, esi
push edi
je 0x40573a
mov ebp, dword [esp + 0x128]
cmp ebp, esi
je 0x40573a
mov ecx, ebp
mov dword [esp + 0x10], esi
call fcn.00445190
test eax, eax
je 0x4051b3
push 0x5c
call fcn.004985f0
mov edi, eax
add esp, 4
cmp edi, esi
je 0x4051a9
mov ecx, ebp
call fcn.00445190
push eax
mov ecx, edi
call fcn.00443dd0
mov ebp, eax
jmp 0x4051ab
xor ebp, ebp
mov dword [esp + 0x10], 1
push 0xffffffffffffffff
mov ecx, ebp
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call fcn.00444cb0
mov edi, eax
push 0xffffffffffffffff
dec edi
mov ecx, ebp
mov dword [esp + 0x24], edi
call fcn.00444d30
mov ebx, eax
mov eax, dword [esp + 0x130]
dec ebx
test eax, eax
mov dword [esp + 0x24], ebx
je 0x405209
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 8]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
mov ebx, edx
mov edi, ecx
mov ecx, ebp
call fcn.00444a10
test eax, eax
je 0x40571e
test esi, esi
jl 0x40571e
mov eax, dword [esp + 0x1c]
test eax, eax
jl 0x40571e
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00444cb0
cmp edi, eax
jge 0x40571e
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00444d30
cmp ebx, eax
jge 0x40571e
cmp esi, edi
jge 0x40571e
cmp dword [esp + 0x1c], ebx
jge 0x40571e
mov ecx, ebp
call fcn.004449f0
mov esi, 1
cmp eax, esi
je 0x40527f
mov eax, dword [esp + 0x12c]
mov ecx, ebp
push eax
call fcn.00446390
lea ecx, [esp + 0x9c]
call fcn.00443d90
mov ebx, dword [esp + 0x134]
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0xd4]
push 0x50
push ecx
push 0x9b
push ebx
mov dword [esp + 0xc4], esi
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], esi
call edi
mov eax, dword [esp + 0x138]
lea edx, [esp + 0xd4]
push 0x1f4
push edx
push eax
push ebx
call fcn.0043ff40
add esp, 0x10
mov esi, eax
push 0
push 0
push 0x402
push 0x82
push esi
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 0x27100000
push 0
push 0x401
push 0x82
push esi
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
lea ecx, [esp + 0xd4]
push 0x50
push ecx
push 0x9c
push ebx
call edi
lea edx, [esp + 0xd4]
push edx
push 0x71
push esi
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov ebx, dword [sym.imp.USER32.dll_SetCursor]
push eax
call ebx
mov dword [esp + 0x34], eax
lea eax, [esp + 0x9c]
push eax
mov ecx, ebp
call fcn.00444320
test eax, eax
je 0x405416
mov ecx, ebp
call fcn.004450c0
test eax, eax
jne 0x405416
mov edi, dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x4cb0dc]
test eax, eax
jne 0x405416
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00444d30
mov ecx, eax
mov eax, 0x51eb851f
add ecx, 0x32
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp edx, 1
jge 0x4053b1
mov edx, 1
jmp 0x4053d0
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00444d30
mov ecx, eax
mov eax, 0x51eb851f
add ecx, 0x32
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
push 0
push 0
push edx
mov ecx, ebp
call fcn.00444730
test eax, eax
je 0x405416
push 0
mov ecx, ebp
call fcn.004451e0
push eax
push 0x402
push 0x82
push esi
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push esi
call fcn.0043ff80
add esp, 4
push esi
call edi
mov ecx, ebp
call fcn.004450c0
test eax, eax
je 0x405379
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [0x4cb0dc]
xor esi, esi
cmp eax, esi
je 0x405459
mov ecx, dword [esp + 0x34]
push ecx
call ebx
cmp dword [esp + 0x10], esi
je 0x405449
cmp ebp, esi
je 0x405449
mov ecx, ebp
call fcn.00443ff0
push ebp
call fcn.00498600
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov ecx, ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x3c], esi
call fcn.00445190
test eax, eax
je 0x4054dd
mov ecx, ebp
call fcn.00445190
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
call edi
add eax, 0x16
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
xor eax, eax
mov ecx, ebp
mov dword [esi], 0x14
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
add esi, 0x14
call fcn.00445190
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, ebp
call fcn.00445190
push eax
call edi
lea esi, [esi + eax + 1]
push ebx
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
sub eax, edx
inc eax
push eax
mov eax, dword [esp + 0x24]
sub eax, ecx
inc eax
push eax
push edx
push ecx
push 0xffffffffffffffff
mov ecx, ebp
call fcn.00445010
push eax
call fcn.0043c650
add esp, 0x14
lea edx, [esp + 0x48]
mov esi, eax
push edx
push 0x54
push esi
mov dword [esp + 0x44], esi
call dword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
je 0x40561d
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x80]
add eax, 3
cdq
and edx, 3
lea ebx, [ecx*4]
add eax, edx
sar eax, 2
imul eax, dword [esp + 0x50]
shl eax, 2
test ebx, ebx
mov dword [esp + 0x40], eax
jne 0x405567
mov ecx, dword [esp + 0x5a]
cmp cx, 8
ja 0x405567
mov ebx, 1
shl ebx, cl
shl ebx, 2
lea edx, [ebx + eax + 0x2c]
mov dword [esp + 0x74], 0
push edx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, 0xa
lea esi, [esp + 0x60]
mov edi, eax
mov dword [esp + 0x30], eax
test ebx, ebx
rep movsd dword es:[edi], dword [esi]
je 0x4055f4
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push edi
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x38]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push esi
call edi
mov ecx, dword [esp + 0x30]
mov edx, ebx
add ecx, 0x28
mov dword [esp + 0x44], eax
shr edx, 2
push ecx
push edx
push 0
push esi
call dword [sym.imp.GDI32.dll_GetDIBColorTable]
mov eax, dword [esp + 0x44]
push eax
push esi
call edi
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x5c]
mov edx, ecx
lea edi, [eax + ebx + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x28]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov esi, dword [esp + 0x38]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405640
test ebp, ebp
je 0x405640
mov ecx, ebp
call fcn.00443ff0
push ebp
call fcn.00498600
add esp, 4
mov ecx, ebp
call fcn.004449f0
cmp eax, 9
jne 0x40569b
mov ecx, ebp
call fcn.004465f0
mov ebp, dword [sym.imp.GDI32.dll_GetMetaFileBitsEx]
mov edi, eax
push 0
push 0
mov ecx, dword [edi + 0x2c]
push ecx
call ebp
mov esi, eax
test esi, esi
je 0x40569b
push esi
call fcn.004985f0
mov edx, dword [edi + 0x2c]
add esp, 4
mov ebx, eax
push ebx
push esi
push edx
call ebp
test eax, eax
je 0x405692
push 0
push 0
push ebx
push esi
call dword [sym.imp.GDI32.dll_SetWinMetaFileBits]
mov dword [esp + 0x3c], eax
push ebx
call fcn.00498600
add esp, 4
mov eax, dword [esp + 0x138]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x405704
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.USER32.dll_SetClipboardData]
test eax, eax
je 0x4056d0
push eax
push 8
call esi
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4056e7
push eax
push 0xe
call esi
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4056fe
push eax
push 0xf
call esi
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x14], eax
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40573a
test ebp, ebp
je 0x40573a
mov ecx, ebp
call fcn.00443ff0
push ebp
call fcn.00498600
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret