Function at 0x1002b6f
Capabilities:
Copy file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x334
test byte [ebp + 0xc], 2
mov eax, dword [0x1007084]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x334], eax
jne 0x1002dfc
xor ecx, ecx
cmp dword [eax + 0x24], ecx
mov dword [ebp - 0x328], ecx
jbe 0x1002dfc
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 0x1002bbf
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 0x1002dd4
jmp 0x1002be4
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 0x1002cdf
dec eax
je 0x1002c76
dec eax
jne 0x1002d8e
cmp dword [esi + 0x254], ecx
jne 0x1002d8e
lea eax, [esi + 0x14c]
push eax
lea eax, [ebp - 0x31c]
push eax
call ebx
push 0x1001310
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 0x1002d8e
mov dword [ebp - 0x324], 1
jmp 0x1002d8e
cmp dword [esi + 0x254], ecx
jne 0x1002d8e
lea eax, [esi + 0x14c]
push eax
lea eax, [ebp - 0x214]
push eax
call ebx
push 0x1001310
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 0x1002c67
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x360], eax
jmp 0x1002d8e
cmp dword [esi + 0x254], ecx
jne 0x1002d8e
mov eax, dword [esi]
cmp eax, ecx
je 0x1002d8e
lea ecx, [ebp - 0x330]
push ecx
push eax
call dword [sym.imp.cmpbk32.dll_PhoneBookLoad]
test eax, eax
jne 0x1002d71
lea eax, [esi + 0x14c]
push eax
lea eax, [ebp - 0x10c]
push eax
call ebx
push 0x1001310
lea eax, [ebp - 0x10c]
push eax
call edi
push 0x10012c8
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 0x1002d56
mov dword [ebp - 0x324], 1
jmp 0x1002d5c
mov dword [esi + 0x360], eax
push dword [ebp - 0x330]
call dword [sym.imp.cmpbk32.dll_PhoneBookUnload]
cmp dword [ebp - 0x324], 0
jne 0x1002d8e
test byte [ebp + 0xd], 4
jne 0x1002d8e
push dword [esi]
push 0x10014a3
push 0x1001488
push 0x1001490
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
inc dword [ebp - 0x320]
mov eax, dword [ebp - 0x320]
cmp eax, dword [esi + 0x364]
jb 0x1002be2
cmp dword [ebp - 0x324], 0
je 0x1002dd4
test byte [ebp + 0xd], 4
jne 0x1002dd4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x1002dd4
mov esi, dword [esi]
test esi, esi
je 0x1002dd4
push esi
push eax
push 0x1001488
push 0x1001490
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 0x1002bbd
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor eax, eax
inc eax
call fcn.01004f75
leave
ret 8