Function at 0x1002dcf
Capabilities:
Copy file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x334
test byte [ebp + 0xc], 2
mov eax, dword [0x100c084]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x334], eax
jne 0x100305c
xor ecx, ecx
cmp dword [eax + 0x24], ecx
mov dword [ebp - 0x328], ecx
jbe 0x100305c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [ebp - 0x32c], ecx
jmp 0x1002e1f
xor ecx, ecx
mov esi, dword [eax + 0x28]
add esi, dword [ebp - 0x32c]
mov dword [ebp - 0x320], ecx
cmp dword [esi + 0x364], ecx
mov dword [esi + 0x360], ecx
jbe 0x1003034
jmp 0x1002e44
xor ecx, ecx
mov eax, dword [esi + 0x368]
mov edx, dword [ebp - 0x320]
mov eax, dword [eax + edx*8 + 4]
dec eax
mov dword [ebp - 0x324], ecx
je 0x1002f3f
dec eax
je 0x1002ed6
dec eax
jne 0x1002fee
cmp dword [esi + 0x254], ecx
jne 0x1002fee
lea eax, [esi + 0x14c]
push eax
lea eax, [ebp - 0x31c]
push eax
call ebx
push 0x1001300
lea eax, [ebp - 0x31c]
push eax
call edi
mov eax, dword [esi + 0x368]
mov ecx, dword [ebp - 0x320]
push dword [eax + ecx*8]
lea eax, [ebp - 0x31c]
push eax
call edi
push 0
push dword [esi + 8]
lea eax, [ebp - 0x31c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x1002fee
mov dword [ebp - 0x324], 1
jmp 0x1002fee
cmp dword [esi + 0x254], ecx
jne 0x1002fee
lea eax, [esi + 0x14c]
push eax
lea eax, [ebp - 0x214]
push eax
call ebx
push 0x1001300
lea eax, [ebp - 0x214]
push eax
call edi
mov eax, dword [esi + 0x368]
mov ecx, dword [ebp - 0x320]
push dword [eax + ecx*8]
lea eax, [ebp - 0x214]
push eax
call edi
push 0
push dword [esi + 4]
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x1002ec7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x360], eax
jmp 0x1002fee
cmp dword [esi + 0x254], ecx
jne 0x1002fee
mov eax, dword [esi]
cmp eax, ecx
je 0x1002fee
lea ecx, [ebp - 0x330]
push ecx
push eax
call dword [sym.imp.cmpbk32.dll_PhoneBookLoad]
test eax, eax
jne 0x1002fd1
lea eax, [esi + 0x14c]
push eax
lea eax, [ebp - 0x10c]
push eax
call ebx
push 0x1001300
lea eax, [ebp - 0x10c]
push eax
call edi
push 0x10012b8
lea eax, [ebp - 0x10c]
push eax
call edi
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 0x330]
call dword [sym.imp.cmpbk32.dll_PhoneBookMergeChanges]
test eax, eax
jne 0x1002fb6
mov dword [ebp - 0x324], 1
jmp 0x1002fbc
mov dword [esi + 0x360], eax
push dword [ebp - 0x330]
call dword [sym.imp.cmpbk32.dll_PhoneBookUnload]
cmp dword [ebp - 0x324], 0
jne 0x1002fee
test byte [ebp + 0xd], 4
jne 0x1002fee
push dword [esi]
push 0x1001493
push 0x1001478
push 0x1001480
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
inc dword [ebp - 0x320]
mov eax, dword [ebp - 0x320]
cmp eax, dword [esi + 0x364]
jb 0x1002e42
cmp dword [ebp - 0x324], 0
je 0x1003034
test byte [ebp + 0xd], 4
jne 0x1003034
mov eax, dword [esi + 0x14]
test eax, eax
je 0x1003034
mov esi, dword [esi]
test esi, esi
je 0x1003034
push esi
push eax
push 0x1001478
push 0x1001480
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
inc dword [ebp - 0x328]
mov eax, dword [ebp - 0x334]
mov ecx, dword [ebp - 0x328]
add dword [ebp - 0x32c], 0x36c
cmp ecx, dword [eax + 0x24]
jb 0x1002e1d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor eax, eax
inc eax
call fcn.010051d5
leave
ret 8