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

Disassembly:
push ebp
sub esp, 0x60
mov eax, 0x6ba07f
call fcn.0066bd6c
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.00495900
mov eax, dword [0x7c1478]
inc dword [0x7c1538]
inc dword [0x7c1454]
push ebx
inc dword [eax]
call fcn.0049605e
mov edi, dword [ebp + 0x6c]
mov dword [0x7c149c], eax
cmp byte [0x7c1508], bl
jne 0x4d2780
mov eax, dword [0x7c1484]
push ebx
inc dword [eax]
call fcn.0049605e
mov dword [0x7c149c], eax
call fcn.00495eac
jmp 0x4d278d
mov byte [edi + 0xa5], 1
mov byte [0x7c1508], bl
mov byte [ebp + 0x6f], 1
call fcn.00478ba6
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp - 4], ebx
call dword [eax + 0x34]
push eax
call fcn.0048e9ab
test eax, eax
jne 0x4d2c6e
cmp dword [0x7c5ef8], eax
mov eax, dword [ebp + 0x74]
sete byte [ebp + 0x5f]
and eax, 0x200
je 0x4d28be
cmp dword [edi + 0x210], ebx
je 0x4d2c2e
push ebx
push ebx
lea eax, [ebp + 0x40]
push eax
call fcn.0045e7b8
push 0xc4
mov byte [ebp - 4], 2
call fcn.0066bada
pop ecx
mov dword [ebp + 0x3c], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4d2800
mov ecx, eax
call fcn.00465b0b
jmp 0x4d2802
mov eax, ebx
mov byte [ebp - 4], 2
mov dword [ebp + 0x60], eax
test eax, eax
je 0x4d2816
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 0x4d2836
cmp dword [ebp + 0x54], 8
jb 0x4d282d
mov eax, dword [ebp + 0x40]
push dword [ebp + 0x50]
push eax
call fcn.00427638
push 0x4c
call fcn.0045e2af
push 0x4c
mov esi, eax
push ebx
push esi
call fcn.0066f070
lea ecx, [esi + 0x18]
add esp, 0xc
lea eax, [ebp + 0x40]
cmp ecx, eax
je 0x4d2867
cmp dword [ebp + 0x54], 8
jb 0x4d285e
mov eax, dword [ebp + 0x40]
push dword [ebp + 0x50]
push eax
call fcn.00427638
push dword [ebp + 0x70]
lea eax, [ebp - 0x24]
push eax
call fcn.0047e71e
push eax
mov ecx, esi
call fcn.0040fb3f
lea ecx, [ebp - 0x24]
call fcn.004102c8
lea eax, [edi + 0x200]
cmp dword [eax + 0x14], 0x10
jb 0x4d2891
mov eax, dword [eax]
push ebx
push ebx
push ebx
lea ecx, [ebp + 0x60]
push ecx
push 0x4d2e85
push esi
push eax
call fcn.00466961
mov eax, dword [ebp + 0x60]
mov byte [ebp - 4], 5
test eax, eax
je 0x4d2c23
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x4d2c23
mov eax, dword [ebp + 0x74]
and eax, 0x10000
mov dword [ebp + 0x3c], eax
test eax, eax
jne 0x4d2c2e
call fcn.0048e707
push eax
call fcn.0048e70d
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 0x4d28e6
sub esi, edx
sar esi, 1
test dword [ebp + 0x74], 0x100
jne 0x4d2929
push esi
push ecx
push dword [ebp + 0x70]
call fcn.0067b3bc
add esp, 0xc
test eax, eax
jne 0x4d2929
push dword [ebp + 0x70]
call fcn.0045e6ab
mov ecx, eax
lea eax, [esi + 1]
sub ecx, dword [ebp + 0x70]
sar ecx, 1
cmp ecx, eax
jbe 0x4d2c2e
cmp byte [ebp + 0x6f], 0
je 0x4d2937
mov byte [ebp + 0x6f], bl
call fcn.00478be7
push dword [ebp + 0x58]
lea eax, [ebp + 0x40]
mov ecx, edi
push eax
call fcn.004a8546
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 6
jb 0x4d2955
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 0x4d2b0e
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
jb 0x4d2975
mov eax, dword [ebp + 0x40]
push eax
call fcn.0046093f
test al, al
je 0x4d299c
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
jb 0x4d298b
mov eax, dword [ebp + 0x40]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x4d2b0e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp byte [ebp + 0x6f], 0
mov dword [ebp + 0x20], eax
jne 0x4d29b4
mov byte [ebp + 0x6f], 1
call fcn.00478ba6
call fcn.004947c1
push eax
push 2
lea ecx, [ebp + 0x10]
call fcn.004945e0
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 8
mov dword [ebp + 0x58], eax
jb 0x4d29da
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x58], eax
push esi
push 0x6efdbc
lea ecx, [ebp + 0x10]
call fcn.0046591f
push dword [ebp + 0x58]
lea ecx, [ebp + 0x10]
push 0x6efdc0
call fcn.0046591f
push dword [ebp + 0x20]
lea ecx, [ebp + 0x10]
push 0x6ef9e4
call fcn.0046591f
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00494598
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0xa
call fcn.00494649
call fcn.004947c1
push eax
push 0x22
lea ecx, [ebp + 0x2c]
call fcn.004945e0
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 0xb
jb 0x4d2a40
mov eax, dword [ebp + 0x40]
push eax
push 0x6efdc0
lea ecx, [ebp + 0x2c]
call fcn.0046591f
lea eax, [ebp + 0x2c]
push eax
lea ecx, [ebp]
call fcn.00494598
lea ecx, [ebp + 0x2c]
mov byte [ebp - 4], 0xd
call fcn.00494649
lea eax, [ebp - 0x1c]
push eax
call fcn.00495af4
cmp byte [ebp + 0x6f], 0
je 0x4d2a7d
mov byte [ebp + 0x6f], bl
call fcn.00478be7
test byte [ebp + 0x74], 4
jne 0x4d2abf
lea eax, [ebp]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00495cb6
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 0xe
jb 0x4d2a9c
mov eax, dword [eax]
push eax
push 0x6d7054
push 0x35
call fcn.00495c7b
add esp, 0xc
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x3c]
mov esi, eax
call fcn.0042756c
cmp esi, 2
je 0x4d2af1
cmp byte [ebp + 0x6f], 0
jne 0x4d2ace
mov byte [ebp + 0x6f], 1
call fcn.00478ba6
lea ecx, [ebp]
call fcn.00494649
lea ecx, [ebp - 0x1c]
call fcn.00494649
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], bl
call fcn.0042756c
mov eax, dword [ebp + 0x3c]
jmp 0x4d28c9
lea ecx, [ebp]
call fcn.00494649
lea ecx, [ebp - 0x1c]
call fcn.00494649
lea ecx, [ebp + 0x40]
call fcn.0042756c
jmp 0x4d2d21
cmp dword [ebp + 0x54], 8
lea eax, [ebp + 0x40]
jb 0x4d2b1a
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.004274a7
mov ecx, edi
call fcn.004b9948
test dword [ebp + 0x74], 0x4000
je 0x4d2b91
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 0x4d2b6c
push esi
lea ecx, [ebp + 0x24]
call fcn.00427613
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.0045ef31
mov byte [ebp + 0x73], 1
test al, al
je 0x4d2b94
mov byte [ebp + 0x73], bl
test byte [ebp + 0x60], 1
mov dword [ebp - 4], 6
je 0x4d2bdc
mov eax, dword [ebp + 0x38]
cmp eax, 8
jb 0x4d2bdc
mov ecx, dword [ebp + 0x24]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x58], eax
mov dword [ebp + 0x60], ecx
cmp eax, 0x1000
jb 0x4d2bd3
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp + 0x60]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x60]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
cmp byte [ebp + 0x73], 0
je 0x4d2c14
push esi
push str.Deleting_original_torrent_file__s
call fcn.00427598
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 0x4d2c14
push esi
push str.Cant_delete_original_torrent_file__s
call fcn.0047d3ef
pop ecx
pop ecx
cmp byte [ebp + 0x6f], 0
jne 0x4d2c23
mov byte [ebp + 0x6f], 1
call fcn.00478ba6
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], bl
call fcn.0042756c
inc dword [0x7c14d8]
lea eax, [edi + 0x54c]
cmp dword [eax + 0x14], 8
mov ecx, eax
jb 0x4d2c44
mov ecx, dword [eax]
test ecx, ecx
je 0x4d2c59
cmp dword [eax + 0x14], 8
jb 0x4d2c50
mov eax, dword [eax]
push eax
push edi
push 7
call fcn.0048a420
mov eax, dword [ebp + 0x74]
shr eax, 1
and al, 1
movzx eax, al
push eax
push edi
call fcn.0048e3a0
test al, al
jne 0x4d2c88
mov ecx, dword [ebp + 0x78]
test ecx, ecx
je 0x4d2d21
push str.torrent_already_exists
call fcn.00427613
jmp 0x4d2d21
cmp byte [ebp + 0x5f], 0
je 0x4d2ca1
push ebx
push ebx
push 0x8068
push dword [0x7f8134]
call dword [sym.imp.USER32.dll_PostMessageW]
test byte [ebp + 0x74], 0x40
mov ecx, edi
je 0x4d2cb0
call fcn.004b52fe
jmp 0x4d2cd5
mov eax, dword [edi]
push 0xffffffffffffffff
push ebx
call dword [eax + 0x50]
cmp dword [0x7c0dd4], 8
mov eax, 0x7c0dc0
jb 0x4d2ccb
mov eax, dword [0x7c0dc0]
push 0xffffffffffffffff
push eax
mov ecx, edi
call fcn.004a5c9f
test byte [ebp + 0x74], 0x10
je 0x4d2ceb
or dword [edi + 0x15c], 0xffffffff
mov ecx, edi
push ebx
push ebx
call fcn.004a4f1a
test dword [ebp + 0x74], 0x400
je 0x4d2cfb
or byte [edi + 0x148], 0x10
push ebx
push ebx
push ebx
call fcn.0048eb19
test byte [ebp + 0x74], 4
jne 0x4d2d1f
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x184]
test al, al
jne 0x4d2d1f
push edi
push 6
call fcn.0048ed40
mov bl, 1
cmp byte [ebp + 0x6f], 0
mov dword [ebp - 4], 0x11
je 0x4d2d33
call fcn.00478be7
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