Function at 0x40bf59
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0xa654]
test al, 1
je 0x40c16b
test byte [ebx + 0x18], 8
je 0x40bf7d
test al, 8
jne 0x40c16b
push edi
xor edi, edi
cmp dword [ebx + 0xa678], edi
mov dword [ebp - 8], edi
jbe 0x40c16a
push esi
mov eax, dword [ebx + 0xa67c]
mov ecx, dword [ebp - 8]
mov esi, dword [eax + ecx*4]
cmp word [esi], di
mov dword [ebp - 4], esi
je 0x40bffe
cmp dword [ebp + 0xc], edi
je 0x40bfb1
push edi
push esi
push dword [ebp + 8]
call dword [ebp + 0xc]
test byte [ebx + 0x18], 8
je 0x40bff7
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov edx, ecx
shr ecx, 2
lea edi, [ebx + 0xaecc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebx + eax*2 + 0xaeca], 0x35
push 0
lea eax, [ebx + 0xaecc]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, dword [ebp - 4]
xor edi, edi
push esi
call dword [ebx + 0xa694]
test byte [ebx + 0x18], 8
jne 0x40c009
xor eax, eax
inc eax
jmp 0x40c01c
mov eax, dword [ebx + 0xa65c]
xor ecx, ecx
cmp eax, dword [ebx + 0xa664]
setne cl
mov eax, ecx
mov ecx, dword [ebx + 0xa67c]
mov edx, dword [ebp - 8]
mov esi, dword [ecx + edx*4]
add esi, 0x208
cmp word [esi], di
mov dword [ebp - 4], esi
je 0x40c094
cmp eax, edi
je 0x40c094
cmp dword [ebp + 0xc], edi
je 0x40c047
push edi
push esi
push dword [ebp + 8]
call dword [ebp + 0xc]
test byte [ebx + 0x18], 8
je 0x40c08d
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov edx, ecx
shr ecx, 2
lea edi, [ebx + 0xaecc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebx + eax*2 + 0xaeca], 0x35
push 0
lea eax, [ebx + 0xaecc]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, dword [ebp - 4]
xor edi, edi
push esi
call dword [ebx + 0xa694]
mov eax, dword [ebx + 0xa67c]
mov ecx, dword [ebp - 8]
mov esi, dword [eax + ecx*4]
add esi, 0x410
cmp word [esi], di
mov dword [ebp - 4], esi
je 0x40c126
test byte [ebx + 0x18], 8
jne 0x40c0ca
cmp dword [ebp + 0xc], edi
je 0x40c0c1
push edi
push esi
push dword [ebp + 8]
call dword [ebp + 0xc]
push esi
call dword [ebx + 0xa694]
jmp 0x40c126
test byte [ebx + 0xa654], 4
je 0x40c126
cmp dword [ebp + 0xc], edi
je 0x40c0e0
push edi
push esi
push dword [ebp + 8]
call dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov edx, ecx
shr ecx, 2
lea edi, [ebx + 0xaecc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [ebx + eax*2 + 0xaeca], 0x35
push 0
lea eax, [ebx + 0xaecc]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push dword [ebp - 4]
call dword [ebx + 0xa694]
xor edi, edi
mov eax, dword [ebx + 0xa67c]
mov ecx, dword [ebp - 8]
mov esi, dword [eax + ecx*4]
add esi, 0x618
cmp word [esi], di
je 0x40c157
test byte [ebx + 0x18], 8
jne 0x40c157
cmp dword [ebp + 0xc], edi
je 0x40c150
push edi
push esi
push dword [ebp + 8]
call dword [ebp + 0xc]
push esi
call dword [ebx + 0xa694]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
cmp eax, dword [ebx + 0xa678]
jb 0x40bf90
pop esi
pop edi
xor eax, eax
inc eax
pop ebx
leave
ret 8