Function at 0x10145940
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x1023c014]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
mov esi, edx
movzx edx, cx
push edi
mov edi, dword [ebp + 8]
cmp dword [esi], 0
jne 0x10145989
mov ecx, dword [edi]
lea eax, [ecx - 1]
cmp eax, 0x3f
ja case.0x1014599c.3
movzx eax, byte [eax + 0x10145c44]
jmp dword [eax*4 + 0x10145c28]
mov dword [esi], ecx
mov dword [esi + 4], 0
mov eax, dword [edi]
dec eax
cmp eax, 0x3f
ja case.0x1014599c.3
movzx eax, byte [eax + 0x10145c9c]
jmp dword [eax*4 + 0x10145c84]
mov ecx, dword [edi + 4]
mov dword [esi + 4], ecx
push ecx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esi], 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 4]
mov dword [esi + 4], ecx
push ecx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esi], 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 4]
xor ecx, ecx
call fcn.10145ce0
mov edi, eax
test edi, edi
je case.0x1014599c.3
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
je case.0x1014599c.3
push 0
push dword [ebx + 0xc]
call dword [sym.imp.GDI32.dll_CopyMetaFileW]
mov dword [ebx + 0xc], eax
push edi
test eax, eax
jne 0x10145a4e
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [esi + 4], edi
mov eax, 1
mov dword [esi], 0x20
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
mov dword [esi], 0x10
jmp 0x10145982
mov dword [esi], 2
mov eax, dword [edi + 4]
test eax, eax
je case.0x1014599c.3
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [eax*2 + 2]
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [esi + 4], eax
test eax, eax
je case.0x1014599c.3
push ebx
push dword [edi + 4]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 4]
mov ecx, dword [esi + 4]
call fcn.10145ce0
test eax, eax
je case.0x1014599c.3
mov dword [esi + 4], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
cmp dword [esi + 4], 0
je case.0x1014599c.3
mov ecx, dword [edi + 4]
test ecx, ecx
je case.0x1014599c.3
mov eax, dword [ecx]
lea edx, [esp + 0x10]
push 1
push edx
push ecx
call dword [eax + 0x30]
test eax, eax
jne case.0x1014599c.3
mov eax, dword [esi + 4]
push 0
push 0
push 0
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x14]
mov eax, dword [edi + 4]
push 0
push 0
push 0
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x14]
mov eax, dword [edi + 4]
push 0
push 0
push dword [esp + 0x24]
mov ecx, dword [eax]
push dword [esp + 0x24]
push dword [esi + 4]
push eax
call dword [ecx + 0x1c]
test eax, eax
jne case.0x1014599c.3
mov eax, dword [esi + 4]
push 0
push 0
push 0
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x14]
mov eax, dword [edi + 4]
push 0
push 0
push 0
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x14]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
push dword [esi + 4]
mov eax, dword [edi + 4]
push 0
push 0
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
test eax, eax
je 0x101459b5
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
push 0
push dword [esi + 4]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret
cmp dword [esi + 4], 0
jne case.0x1014599c.3
push 0
push edx
push dword [edi + 4]
call dword [sym.imp.ole32.dll_OleDuplicateData]
mov dword [esi + 4], eax
test eax, eax
jne 0x101459b5
mov ecx, dword [esp + 0x5c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1008548c
mov esp, ebp
pop ebp
ret