Function at 0x4c586c
Capabilities:
Copy file
Delete file
Set file attributes

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x6b060c
call fcn.00664608
sub esp, 0x30
push ebx
push esi
xor ebx, ebx
mov eax, ebx
push edi
mov dword [ebp + 0x60], eax
mov dword [ebp + 0x3c], eax
call fcn.00488a31
mov eax, dword [0x7b67a8]
inc dword [0x7b6868]
inc dword [0x7b6784]
push ebx
inc dword [eax]
call fcn.0048918f
mov edi, dword [ebp + 0x6c]
mov dword [0x7b67cc], eax
cmp byte [0x7b6838], bl
jne 0x4c58d1
mov eax, dword [0x7b67b4]
push ebx
inc dword [eax]
call fcn.0048918f
mov dword [0x7b67cc], eax
call fcn.00488fdd
jmp 0x4c58de
mov byte [edi + 0xa5], 1
mov byte [0x7b6838], bl
mov byte [ebp + 0x6f], 1
call fcn.0046bca7
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp - 4], ebx
call dword [eax + 0x34]
push eax
call fcn.00481ac4
test eax, eax
jne 0x4c5dbf
cmp dword [0x7bb228], eax
mov eax, dword [ebp + 0x74]
sete byte [ebp + 0x5f]
and eax, 0x200
je 0x4c5a0f
cmp dword [edi + 0x210], ebx
je 0x4c5d7f
push ebx
push ebx
lea eax, [ebp + 0x40]
push eax
call fcn.004518bd
push 0xc4
mov byte [ebp - 4], 2
call fcn.00664379
pop ecx
mov dword [ebp + 0x3c], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4c5951
mov ecx, eax
call fcn.00458c2c
jmp 0x4c5953
mov eax, ebx
mov byte [ebp - 4], 2
mov dword [ebp + 0x60], eax
test eax, eax
je 0x4c5967
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov eax, dword [ebp + 0x60]
lea ecx, [eax + 8]
mov byte [ebp - 4], 4
lea eax, [ebp + 0x40]
cmp ecx, eax
je 0x4c5987
cmp dword [ebp + 0x54], 8
jb 0x4c597e
mov eax, dword [ebp + 0x40]
push dword [ebp + 0x50]
push eax
call fcn.00427bc8
push 0x4c
call fcn.004513b4
push 0x4c
mov esi, eax
push ebx
push esi
call fcn.006678b0
lea ecx, [esi + 0x18]
add esp, 0xc
lea eax, [ebp + 0x40]
cmp ecx, eax
je 0x4c59b8
cmp dword [ebp + 0x54], 8
jb 0x4c59af
mov eax, dword [ebp + 0x40]
push dword [ebp + 0x50]
push eax
call fcn.00427bc8
push dword [ebp + 0x70]
lea eax, [ebp - 0x24]
push eax
call fcn.0047181f
push eax
mov ecx, esi
call fcn.004100cf
lea ecx, [ebp - 0x24]
call fcn.00410858
lea eax, [edi + 0x200]
cmp dword [eax + 0x14], 0x10
jb 0x4c59e2
mov eax, dword [eax]
push ebx
push ebx
push ebx
lea ecx, [ebp + 0x60]
push ecx
push 0x4c5fd6
push esi
push eax
call fcn.00459a82
mov eax, dword [ebp + 0x60]
mov byte [ebp - 4], 5
test eax, eax
je 0x4c5d74
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x4c5d74
mov eax, dword [ebp + 0x74]
and eax, 0x10000
mov dword [ebp + 0x3c], eax
test eax, eax
jne 0x4c5d7f
call fcn.00481820
push eax
call fcn.00481826
mov ecx, eax
mov esi, ecx
mov dword [ebp + 0x58], ecx
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x4c5a37
sub esi, edx
sar esi, 1
test dword [ebp + 0x74], 0x100
jne 0x4c5a7a
push esi
push ecx
push dword [ebp + 0x70]
call fcn.006738ff
add esp, 0xc
test eax, eax
jne 0x4c5a7a
push dword [ebp + 0x70]
call fcn.004517b0
mov ecx, eax
lea eax, [esi + 1]
sub ecx, dword [ebp + 0x70]
sar ecx, 1
cmp ecx, eax
jbe 0x4c5d7f
cmp byte [ebp + 0x6f], 0
je 0x4c5a88
mov byte [ebp + 0x6f], bl
call fcn.0046bce8
push dword [ebp + 0x58]
lea eax, [ebp + 0x40]
mov ecx, edi
push eax
call fcn.0049b677
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 6
jb 0x4c5aa6
mov eax, dword [ebp + 0x40]
mov esi, dword [ebp + 0x70]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x4c5c5f
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
jb 0x4c5ac6
mov eax, dword [ebp + 0x40]
push eax
call fcn.00453a60
test al, al
je 0x4c5aed
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
jb 0x4c5adc
mov eax, dword [ebp + 0x40]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x4c5c5f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp byte [ebp + 0x6f], 0
mov dword [ebp + 0x20], eax
jne 0x4c5b05
mov byte [ebp + 0x6f], 1
call fcn.0046bca7
call fcn.004878f2
push eax
push 2
lea ecx, [ebp + 0x10]
call fcn.00487711
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 8
mov dword [ebp + 0x58], eax
jb 0x4c5b2b
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x58], eax
push esi
push 0x6e5b7c
lea ecx, [ebp + 0x10]
call fcn.00458a40
push dword [ebp + 0x58]
lea ecx, [ebp + 0x10]
push 0x6e5b80
call fcn.00458a40
push dword [ebp + 0x20]
lea ecx, [ebp + 0x10]
push 0x6e57a4
call fcn.00458a40
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004876c9
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0xa
call fcn.0048777a
call fcn.004878f2
push eax
push 0x22
lea ecx, [ebp + 0x2c]
call fcn.00487711
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 0xb
jb 0x4c5b91
mov eax, dword [ebp + 0x40]
push eax
push 0x6e5b80
lea ecx, [ebp + 0x2c]
call fcn.00458a40
lea eax, [ebp + 0x2c]
push eax
lea ecx, [ebp]
call fcn.004876c9
lea ecx, [ebp + 0x2c]
mov byte [ebp - 4], 0xd
call fcn.0048777a
lea eax, [ebp - 0x1c]
push eax
call fcn.00488c25
cmp byte [ebp + 0x6f], 0
je 0x4c5bce
mov byte [ebp + 0x6f], bl
call fcn.0046bce8
test byte [ebp + 0x74], 4
jne 0x4c5c10
lea eax, [ebp]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00488de7
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 0xe
jb 0x4c5bed
mov eax, dword [eax]
push eax
push 0x6ce074
push 0x35
call fcn.00488dac
add esp, 0xc
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x3c]
mov esi, eax
call fcn.00427afc
cmp esi, 2
je 0x4c5c42
cmp byte [ebp + 0x6f], 0
jne 0x4c5c1f
mov byte [ebp + 0x6f], 1
call fcn.0046bca7
lea ecx, [ebp]
call fcn.0048777a
lea ecx, [ebp - 0x1c]
call fcn.0048777a
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], bl
call fcn.00427afc
mov eax, dword [ebp + 0x3c]
jmp 0x4c5a1a
lea ecx, [ebp]
call fcn.0048777a
lea ecx, [ebp - 0x1c]
call fcn.0048777a
lea ecx, [ebp + 0x40]
call fcn.00427afc
jmp 0x4c5e72
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
jb 0x4c5c6b
mov eax, dword [ebp + 0x40]
push 0x80
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
sub esp, 0x18
lea eax, [ebp + 0x40]
mov ecx, esp
push eax
mov dword [ecx], ebx
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], ebx
call fcn.00427a37
mov ecx, edi
call fcn.004aca79
test dword [ebp + 0x74], 0x4000
je 0x4c5ce2
xor eax, eax
mov dword [ebp + 0x24], ebx
mov dword [ebp + 0x34], ebx
mov dword [ebp + 0x38], 7
mov word [ebp + 0x24], ax
test esi, esi
je 0x4c5cbd
push esi
lea ecx, [ebp + 0x24]
call fcn.00427ba3
mov eax, dword [ebp + 0x60]
or eax, 3
mov byte [ebp - 4], 7
mov dword [ebp + 0x60], eax
mov dword [ebp + 0x3c], eax
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp + 0x24]
push eax
call fcn.00452036
mov byte [ebp + 0x73], 1
test al, al
je 0x4c5ce5
mov byte [ebp + 0x73], bl
test byte [ebp + 0x60], 1
mov dword [ebp - 4], 6
je 0x4c5d2d
mov eax, dword [ebp + 0x38]
cmp eax, 8
jb 0x4c5d2d
mov ecx, dword [ebp + 0x24]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x58], eax
mov dword [ebp + 0x60], ecx
cmp eax, 0x1000
jb 0x4c5d24
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp + 0x60]
push eax
call fcn.004279ae
mov eax, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x60]
push eax
push ecx
call fcn.006643a9
pop ecx
pop ecx
cmp byte [ebp + 0x73], 0
je 0x4c5d65
push esi
push str.Deleting_original_torrent_file__s
call fcn.00427b28
add esp, 8
push 0x80
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x4c5d65
push esi
push str.Cant_delete_original_torrent_file__s
call fcn.004704f0
pop ecx
pop ecx
cmp byte [ebp + 0x6f], 0
jne 0x4c5d74
mov byte [ebp + 0x6f], 1
call fcn.0046bca7
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], bl
call fcn.00427afc
inc dword [0x7b6808]
lea eax, [edi + 0x54c]
cmp dword [eax + 0x14], 8
mov ecx, eax
jb 0x4c5d95
mov ecx, dword [eax]
test ecx, ecx
je 0x4c5daa
cmp dword [eax + 0x14], 8
jb 0x4c5da1
mov eax, dword [eax]
push eax
push edi
push 7
call fcn.0047d521
mov eax, dword [ebp + 0x74]
shr eax, 1
and al, 1
movzx eax, al
push eax
push edi
call fcn.004814b9
test al, al
jne 0x4c5dd9
mov ecx, dword [ebp + 0x78]
test ecx, ecx
je 0x4c5e72
push str.torrent_already_exists
call fcn.00427ba3
jmp 0x4c5e72
cmp byte [ebp + 0x5f], 0
je 0x4c5df2
push ebx
push ebx
push 0x8068
push dword [0x7ed500]
call dword [sym.imp.USER32.dll_PostMessageW]
test byte [ebp + 0x74], 0x40
mov ecx, edi
je 0x4c5e01
call fcn.004a842f
jmp 0x4c5e26
mov eax, dword [edi]
push 0xffffffffffffffff
push ebx
call dword [eax + 0x50]
cmp dword [0x7b6104], 8
mov eax, 0x7b60f0
jb 0x4c5e1c
mov eax, dword [0x7b60f0]
push 0xffffffffffffffff
push eax
mov ecx, edi
call fcn.00498dd0
test byte [ebp + 0x74], 0x10
je 0x4c5e3c
or dword [edi + 0x15c], 0xffffffff
mov ecx, edi
push ebx
push ebx
call fcn.0049804b
test dword [ebp + 0x74], 0x400
je 0x4c5e4c
or byte [edi + 0x148], 0x10
push ebx
push ebx
push ebx
call fcn.00481c32
test byte [ebp + 0x74], 4
jne 0x4c5e70
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x184]
test al, al
jne 0x4c5e70
push edi
push 6
call fcn.00481e59
mov bl, 1
cmp byte [ebp + 0x6f], 0
mov dword [ebp - 4], 0x11
je 0x4c5e84
call fcn.0046bce8
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add ebp, 0x64
leave
ret 0x10