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

Disassembly:
push ebp
sub esp, 0x5c
mov eax, 0x6a5c5a
call fcn.00640244
sub esp, 0x40
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp + 0x3c], ebx
mov dword [ebp + 0x34], ebx
call fcn.00495185
mov eax, dword [0x7acdf8]
inc dword [0x7aceb8]
inc dword [0x7acdd8]
push ebx
inc dword [eax]
call fcn.0049583b
mov esi, dword [ebp + 0x68]
mov dword [0x7ace1c], eax
cmp byte [0x7ace88], bl
jne 0x4d1272
mov eax, dword [0x7ace04]
push ebx
inc dword [eax]
call fcn.0049583b
mov dword [0x7ace1c], eax
call fcn.00495668
jmp 0x4d127f
mov byte [esi + 0xa5], 1
mov byte [0x7ace88], bl
mov bl, 1
mov byte [ebp + 0x6b], bl
call fcn.00478821
mov eax, dword [esi]
mov ecx, esi
and dword [ebp - 4], 0
call dword [eax + 0x34]
push eax
call fcn.0048d304
test eax, eax
je 0x4d12c3
cmp dword [ebp + 0x74], 0
je 0x4d1804
mov esi, str.torrent_already_exists
push esi
call fcn.00428460
pop ecx
mov ecx, dword [ebp + 0x74]
push eax
push esi
call fcn.00438cfb
jmp 0x4d1804
test dword [ebp + 0x70], 0x200
mov edi, dword [0x7b188c]
mov dword [ebp + 0x58], edi
je 0x4d13c9
xor eax, eax
cmp dword [esi + 0x20c], eax
je 0x4d16fc
push eax
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.0046059a
push 0xc4
mov byte [ebp - 4], 2
call fcn.0063ffa4
pop ecx
mov dword [ebp + 0x30], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4d1315
mov ecx, eax
call fcn.004666da
jmp 0x4d1317
xor eax, eax
mov byte [ebp - 4], 2
mov dword [ebp + 0x5c], eax
test eax, eax
je 0x4d132b
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov eax, dword [ebp + 0x5c]
lea ecx, [eax + 8]
mov byte [ebp - 4], 4
lea eax, [ebp - 0x34]
cmp ecx, eax
je 0x4d1343
push 0xffffffffffffffff
push 0
push eax
call fcn.0042835e
push 0x4c
call fcn.004600d6
push 0x4c
mov edi, eax
push 0
push edi
call fcn.0065ab80
lea ecx, [edi + 0x18]
add esp, 0xc
lea eax, [ebp - 0x34]
cmp ecx, eax
je 0x4d136d
push 0xffffffffffffffff
push 0
push eax
call fcn.0042835e
push dword [ebp + 0x6c]
lea eax, [ebp + 0x40]
push eax
call fcn.0047dece
push eax
mov ecx, edi
call fcn.0040eb52
push 0
push 1
lea ecx, [ebp + 0x40]
call fcn.0040f52f
lea ecx, [esi + 0x1fc]
cmp dword [ecx + 0x14], 0x10
jb 0x4d139b
mov ecx, dword [ecx]
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp + 0x5c]
push eax
push 0x4d197b
push edi
push ecx
call fcn.0046736f
mov eax, dword [ebp + 0x5c]
mov byte [ebp - 4], 5
test eax, eax
je 0x4d13c1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x34]
jmp 0x4d16ec
mov eax, dword [ebp + 0x70]
and eax, 0x10000
mov dword [ebp + 0x30], eax
test eax, eax
jne 0x4d16f9
call fcn.0048d06d
push eax
call fcn.0048d073
mov edx, eax
xor ecx, ecx
mov edi, edx
mov dword [ebp + 0x38], edx
lea eax, [edi + 2]
mov dword [ebp + 0x5c], eax
mov ax, word [edi]
add edi, 2
cmp ax, cx
jne 0x4d13f6
sub edi, dword [ebp + 0x5c]
sar edi, 1
test dword [ebp + 0x70], 0x100
jne 0x4d143c
push edi
push edx
push dword [ebp + 0x6c]
call fcn.00665a54
add esp, 0xc
test eax, eax
jne 0x4d143a
push dword [ebp + 0x6c]
call fcn.0046047f
mov ecx, eax
lea eax, [edi + 1]
sub ecx, dword [ebp + 0x6c]
sar ecx, 1
cmp ecx, eax
jbe 0x4d16f9
xor ecx, ecx
test bl, bl
je 0x4d144a
mov bl, cl
mov byte [ebp + 0x6b], bl
call fcn.00478862
push dword [ebp + 0x38]
lea eax, [ebp + 0x40]
mov ecx, esi
push eax
call fcn.004a7339
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
mov byte [ebp - 4], 6
jae 0x4d1468
lea eax, [ebp + 0x40]
mov edi, dword [ebp + 0x6c]
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x4d162d
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
jae 0x4d1489
lea eax, [ebp + 0x40]
push eax
call fcn.00461e6d
test al, al
je 0x4d14b1
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
jae 0x4d149f
lea eax, [ebp + 0x40]
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x4d162d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 0x38], eax
test bl, bl
jne 0x4d14c8
inc bl
mov byte [ebp + 0x6b], bl
call fcn.00478821
call fcn.00493af8
push eax
push 2
lea ecx, [ebp + 0x20]
call fcn.00493570
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
mov byte [ebp - 4], 8
jae 0x4d14e8
lea eax, [ebp + 0x40]
push edi
push 0x6dc404
lea ecx, [ebp + 0x20]
mov dword [ebp + 0x5c], eax
call fcn.0049a3bd
push dword [ebp + 0x5c]
mov edi, 0x6dc408
lea ecx, [ebp + 0x20]
push edi
call fcn.0049a3bd
push dword [ebp + 0x38]
lea ecx, [ebp + 0x20]
push 0x6dc02c
call fcn.0049a3bd
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00493525
lea ecx, [ebp + 0x20]
mov byte [ebp - 4], 0xa
call fcn.00493621
call fcn.00493af8
push eax
push 0x22
lea ecx, [ebp + 0x10]
call fcn.00493570
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
mov byte [ebp - 4], 0xb
jae 0x4d1552
lea eax, [ebp + 0x40]
push eax
push edi
lea ecx, [ebp + 0x10]
call fcn.0049a3bd
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp]
call fcn.00493525
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0xd
call fcn.00493621
lea eax, [ebp - 0x1c]
push eax
call fcn.0049532b
test bl, bl
je 0x4d158b
xor bl, bl
mov byte [ebp + 0x6b], bl
call fcn.00478862
test byte [ebp + 0x70], 4
jne 0x4d15ce
lea eax, [ebp]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.004954e2
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 0xe
jb 0x4d15aa
mov eax, dword [eax]
push eax
push 0x6c101c
push 0x35
call fcn.004954a5
add esp, 0xc
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x4c]
mov edi, eax
push 0
push 1
call fcn.004281f2
jmp 0x4d15d1
xor edi, edi
inc edi
cmp edi, 2
je 0x4d160c
test bl, bl
jne 0x4d15e4
inc bl
mov byte [ebp + 0x6b], bl
call fcn.00478821
lea ecx, [ebp]
call fcn.00493621
lea ecx, [ebp - 0x1c]
call fcn.00493621
xor eax, eax
lea ecx, [ebp + 0x40]
push eax
push 1
mov byte [ebp - 4], al
call fcn.004281f2
mov eax, dword [ebp + 0x30]
jmp 0x4d13d4
lea ecx, [ebp]
call fcn.00493621
lea ecx, [ebp - 0x1c]
call fcn.00493621
push 0
push 1
lea ecx, [ebp + 0x40]
call fcn.004281f2
jmp 0x4d175a
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
jae 0x4d1639
lea eax, [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
call fcn.00427b8e
mov ecx, esi
call fcn.004b7074
test dword [ebp + 0x70], 0x4000
je 0x4d168a
push edi
lea eax, [ebp - 0x4c]
push eax
call fcn.00429352
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 7
push ecx
push eax
mov dword [ebp + 0x34], 1
call fcn.00460abd
test al, al
jne 0x4d168a
mov bh, 1
jmp 0x4d168c
xor bh, bh
test byte [ebp + 0x34], 1
mov dword [ebp - 4], 6
je 0x4d16a5
push 0
push 1
lea ecx, [ebp - 0x4c]
call fcn.004281f2
test bh, bh
je 0x4d16db
push edi
push str.Deleting_original_torrent_file__s
call fcn.0040e2b4
add esp, 8
push 0x80
push edi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x4d16db
push edi
push str.Cant_delete_original_torrent_file__s
call fcn.0047cc80
pop ecx
pop ecx
test bl, bl
jne 0x4d16e9
inc bl
mov byte [ebp + 0x6b], bl
call fcn.00478821
lea ecx, [ebp + 0x40]
xor eax, eax
push eax
push 1
mov byte [ebp - 4], al
call fcn.004281f2
mov edi, dword [ebp + 0x58]
inc dword [0x7ace58]
lea eax, [esi + 0x528]
cmp dword [eax + 0x14], 8
jb 0x4d1712
mov ecx, dword [eax]
jmp 0x4d1714
mov ecx, eax
test ecx, ecx
je 0x4d1729
cmp dword [eax + 0x14], 8
jb 0x4d1720
mov eax, dword [eax]
push eax
push esi
push 7
call fcn.00487b3b
mov eax, dword [ebp + 0x70]
shr eax, 1
and al, 1
movzx eax, al
push eax
push esi
call fcn.0048cd0d
test al, al
jne 0x4d1764
cmp dword [ebp + 0x74], 0
je 0x4d175a
mov esi, str.torrent_already_exists
push esi
call fcn.00428460
pop ecx
mov ecx, dword [ebp + 0x74]
push eax
push esi
call fcn.00438cfb
xor eax, eax
mov dword [ebp + 0x3c], eax
jmp 0x4d1804
test edi, edi
jne 0x4d177d
xor eax, eax
push eax
push eax
push 0x8068
push dword [0x7e2568]
call dword [sym.imp.USER32.dll_PostMessageW]
test byte [ebp + 0x70], 0x40
mov ecx, esi
je 0x4d178c
call fcn.004b2ff6
jmp 0x4d17b2
mov eax, dword [esi]
push 0xffffffffffffffff
push 0
call dword [eax + 0x50]
cmp dword [0x7ac75c], 8
mov eax, dword [0x7ac748]
jae 0x4d17a8
mov eax, 0x7ac748
push 0xffffffffffffffff
push eax
mov ecx, esi
call fcn.004a4c89
test byte [ebp + 0x70], 0x10
je 0x4d17ca
or dword [esi + 0x158], 0xffffffff
xor eax, eax
push eax
push eax
mov ecx, esi
call fcn.004a4015
test dword [ebp + 0x70], 0x400
je 0x4d17da
or byte [esi + 0x144], 0x10
xor eax, eax
push eax
push eax
push eax
call fcn.0048d46f
test byte [ebp + 0x70], 4
jne 0x4d1800
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x184]
test al, al
jne 0x4d1800
push esi
push 6
call fcn.0048d69c
mov byte [ebp + 0x3c], 1
mov dword [ebp - 4], 0x11
test bl, bl
je 0x4d1814
call fcn.00478862
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp + 0x3c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
lea esp, [ebp + 0x60]
pop ebp
ret 0x10