Function at 0x4f8830
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
cmp dword [eax], 0
jne 0x4f8a25
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 0
jne 0x4f87ee
push 0x2b0
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f87ee
int3
xor edx, edx
test edx, edx
jne 0x4f87d2
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [ebp - 0x88], ecx
mov edx, dword [ebp - 0x88]
sub edx, 1
mov dword [ebp - 0x88], edx
cmp dword [ebp - 0x88], 0x3f
ja case.0x4f8829.6
mov ecx, dword [ebp - 0x88]
xor eax, eax
mov al, byte [ecx + 0x4f8e36]
jmp dword [eax*4 + 0x4f8e1a]
xor edx, edx
test edx, edx
je 0x4f8837
int3
xor eax, eax
test eax, eax
jne case.0x4f8829.0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov dword [ecx], eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], 0
jmp 0x4f8a25
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
mov ecx, dword [edx]
push eax
call dword [ecx + 4]
mov edx, dword [ebp + 0xc]
mov dword [edx], 4
mov eax, 1
jmp 0x4f8e0b
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov edx, dword [eax]
push ecx
call dword [edx + 4]
mov eax, dword [ebp + 0xc]
mov dword [eax], 8
mov eax, 1
jmp 0x4f8e0b
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 4]
push edx
push 0
call fcn.004f86b9
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4f88d6
xor eax, eax
jmp 0x4f8e0b
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4f88fd
push 0x2cd
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f88fd
int3
xor ecx, ecx
test ecx, ecx
jne 0x4f88e3
push 0
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.GDI32.dll_CopyMetaFileA]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0xc], 0
jne 0x4f893c
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4f8e0b
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0xc]
mov dword [edx], 0x20
mov eax, 1
jmp 0x4f8e0b
mov eax, dword [ebp + 0xc]
mov dword [eax], 0x10
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], 0
jmp 0x4f8a25
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp + 0xc]
mov dword [edx], 2
mov eax, dword [ebp + 0x10]
cmp dword [eax + 4], 0
jne 0x4f89bc
push 0x2e6
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f89bc
int3
xor ecx, ecx
test ecx, ecx
jne 0x4f899f
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
push eax
call fcn.00418eb0
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
shl ecx, 1
push ecx
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
mov dword [edx + 4], eax
cmp dword [ebp - 0xc], 0
jne 0x4f89f9
xor eax, eax
jmp 0x4f8e0b
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + ecx + 2]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.004218c0
add esp, 0xc
mov eax, 1
jmp 0x4f8e0b
xor eax, eax
jmp 0x4f8e0b
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax]
cmp edx, dword [ecx]
je 0x4f8a45
push 0x2f5
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8a45
int3
xor eax, eax
test eax, eax
jne 0x4f8a25
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov dword [ebp - 0x8c], edx
mov eax, dword [ebp - 0x8c]
sub eax, 1
mov dword [ebp - 0x8c], eax
cmp dword [ebp - 0x8c], 0x3f
ja case.0x4f8a80.5
mov edx, dword [ebp - 0x8c]
xor ecx, ecx
mov cl, byte [edx + 0x4f8e8e]
jmp dword [ecx*4 + 0x4f8e76]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
push eax
call fcn.004f86b9
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4f8aaa
xor eax, eax
jmp 0x4f8e0b
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x24]
mov dword [ecx + 4], edx
mov eax, 1
jmp 0x4f8e0b
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
jne 0x4f8ada
push 0x306
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8ada
int3
xor ecx, ecx
test ecx, ecx
jne case.0x4f8a80.2
mov edx, dword [ebp + 0x10]
cmp dword [edx + 4], 0
jne 0x4f8afd
push 0x307
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8afd
int3
xor eax, eax
test eax, eax
jne 0x4f8ae0
push 1
lea ecx, [ebp - 0x6c]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 4]
mov ecx, dword [edx]
push eax
call dword [ecx + 0x30]
test eax, eax
je 0x4f8b26
xor eax, eax
jmp 0x4f8e0b
cmp dword [ebp - 0x6c], 0
je 0x4f8b40
push 0x310
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8b40
int3
xor edx, edx
test edx, edx
jne 0x4f8b26
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
push 0
push 0
mov eax, dword [ebp - 0x70]
push eax
mov ecx, dword [ebp - 0x74]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
mov ecx, dword [edx]
push eax
call dword [ecx + 0x14]
push 0
push 0
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x74]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
push edx
call dword [eax + 0x14]
push 0
push 0
mov ecx, dword [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x64]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 4]
mov ecx, dword [edx]
push eax
call dword [ecx + 0x1c]
test eax, eax
je 0x4f8bc0
xor eax, eax
jmp 0x4f8e0b
push 0
push 0
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x74]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
push edx
call dword [eax + 0x14]
push 0
push 0
mov ecx, dword [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0x74]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
mov edx, dword [eax]
push ecx
call dword [edx + 0x14]
mov eax, 1
jmp 0x4f8e0b
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
jne 0x4f8c23
push 0x327
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8c23
int3
xor ecx, ecx
test ecx, ecx
jne case.0x4f8a80.3
mov edx, dword [ebp + 0x10]
cmp dword [edx + 4], 0
jne 0x4f8c46
push 0x328
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8c46
int3
xor eax, eax
test eax, eax
jne 0x4f8c29
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
push edx
push 0
push 0
push 0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
mov edx, dword [eax]
push ecx
call dword [edx + 0x1c]
test eax, eax
je 0x4f8c76
xor eax, eax
jmp 0x4f8e0b
mov eax, 1
jmp 0x4f8e0b
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x80], 0
mov eax, dword [ebp + 0x10]
cmp dword [eax + 4], 0
jne 0x4f8cbc
push 0x333
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8cbc
int3
xor ecx, ecx
test ecx, ecx
jne 0x4f8c9f
mov edx, dword [ebp + 0xc]
cmp dword [edx + 4], 0
jne 0x4f8cdf
push 0x334
push str.olemisc.cpp
call fcn.004d5a20
test eax, eax
je 0x4f8cdf
int3
xor eax, eax
test eax, eax
jne 0x4f8cc2
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x78], edx
cmp dword [ebp - 0x78], 0
jne 0x4f8d00
mov dword [ebp - 0x90], 0
jmp 0x4f8d47
mov eax, dword [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov dword [ebp - 0x84], ecx
mov eax, dword [ebp - 0x84]
add eax, 3
and al, 0xfc
call fcn.00422820
mov dword [ebp - 0x94], esp
mov edx, dword [ebp - 0x84]
push edx
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
call fcn.00412160
mov dword [ebp - 0x90], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 4]
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
jne 0x4f8d62
mov dword [ebp - 0x98], 0
jmp 0x4f8da9
mov ecx, dword [ebp - 0x78]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [eax + eax + 2]
mov dword [ebp - 0x84], edx
mov eax, dword [ebp - 0x84]
add eax, 3
and al, 0xfc
call fcn.00422820
mov dword [ebp - 0x9c], esp
mov eax, dword [ebp - 0x84]
push eax
mov ecx, dword [ebp - 0x78]
push ecx
mov edx, dword [ebp - 0x9c]
push edx
call fcn.00412160
mov dword [ebp - 0x98], eax
push 0
mov eax, dword [ebp - 0x90]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
jmp 0x4f8e0b
xor edx, edx
test edx, edx
je 0x4f8dc8
int3
xor eax, eax
test eax, eax
jne case.0x4f8a80.4
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 4], 0
je 0x4f8ddb
xor eax, eax
jmp 0x4f8e0b
push 0
mov dx, word [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.ole32.dll_OleDuplicateData]
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
jne 0x4f8e02
xor eax, eax
jmp 0x4f8e0b
mov eax, 1
jmp 0x4f8e0b
xor eax, eax
lea esp, [ebp - 0xa8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc