Function at 0x52c946
Capabilities:
Copy file
Delete file
Resolve function by parsing pe exports
Set file attributes

Disassembly:
mov eax, 0x677315
call fcn.006313fc
sub esp, 0xa8
push ebx
xor ebx, ebx
push ebp
mov dword [esp + 0x34], ebx
mov eax, dword [0x75f8f0]
inc dword [0x75f9b0]
push esi
push edi
inc dword [eax]
push ebx
mov dword [esp + 0x3c], ebx
call fcn.004919d8
mov edi, dword [esp + 0xcc]
mov dword [0x75f914], eax
cmp byte [0x75f980], bl
jne 0x52c99f
mov eax, dword [0x75f8fc]
push ebx
inc dword [eax]
call fcn.004919d8
mov dword [0x75f914], eax
jmp 0x52c9ac
mov byte [edi + 0xa5], 1
mov byte [0x75f980], bl
mov bl, 1
mov byte [esp + 0x12], bl
call fcn.00475044
mov eax, dword [edi]
mov ecx, edi
and dword [esp + 0xc0], 0
call dword [eax + 0x34]
push eax
call fcn.0048922a
test eax, eax
je 0x52c9fd
cmp dword [esp + 0xd8], 0
je 0x52d023
mov esi, str.torrent_already_exists
push esi
call fcn.004236bc
pop ecx
mov ecx, dword [esp + 0xd8]
push eax
push esi
call fcn.00434a57
jmp 0x52d023
cmp dword [0x7641f8], 0
mov ecx, dword [esp + 0xd4]
mov ebp, dword [esp + 0xd0]
sete bh
and ecx, 0x200
mov byte [esp + 0x13], bh
mov dword [esp + 0x34], ecx
je 0x52cb49
xor eax, eax
cmp dword [edi + 0x1fc], eax
je 0x52cb49
push eax
push eax
lea eax, [esp + 0x80]
push eax
call fcn.0045ddbc
push 0xc4
mov byte [esp + 0xc4], 1
call fcn.00630af1
pop ecx
mov dword [esp + 0x14], eax
mov byte [esp + 0xc0], 2
test eax, eax
je 0x52ca72
mov ecx, eax
call fcn.00462830
jmp 0x52ca74
xor eax, eax
mov byte [esp + 0xc0], 1
mov dword [esp + 0x18], eax
test eax, eax
je 0x52ca8e
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
mov eax, dword [esp + 0x18]
lea ecx, [eax + 8]
mov byte [esp + 0xc0], 3
lea eax, [esp + 0x78]
cmp ecx, eax
je 0x52caab
push 0xffffffffffffffff
push 0
push eax
call fcn.0042358a
push 0x4c
call fcn.0045d923
push 0x4c
mov esi, eax
push 0
push esi
call fcn.00635a30
lea ecx, [esi + 0x18]
add esp, 0xc
lea eax, [esp + 0x78]
cmp ecx, eax
je 0x52cad6
push 0xffffffffffffffff
push 0
push eax
call fcn.0042358a
push ebp
lea eax, [esp + 0x20]
push eax
call fcn.0047a0e4
push eax
mov ecx, esi
call fcn.00409822
push 0
push 1
lea ecx, [esp + 0x24]
call fcn.0040a0e9
lea ecx, [edi + 0x1ec]
cmp dword [ecx + 0x14], 0x10
jb 0x52cb04
mov ecx, dword [ecx]
xor eax, eax
push eax
push eax
push eax
lea eax, [esp + 0x24]
push eax
push 0x52d19e
push esi
push ecx
call fcn.004635ab
mov eax, dword [esp + 0x18]
mov byte [esp + 0xc0], 1
test eax, eax
je 0x52cb30
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor eax, eax
lea ecx, [esp + 0x78]
push eax
push 1
mov byte [esp + 0xc8], al
call fcn.0042341c
mov ecx, dword [esp + 0x34]
test ecx, ecx
jne 0x52cefd
mov eax, dword [esp + 0xd4]
and eax, 0x100
mov dword [esp + 0x18], eax
call fcn.00488bd1
push eax
call fcn.00488bd7
mov edx, eax
xor ecx, ecx
mov esi, edx
mov dword [esp + 0x14], edx
lea eax, [esi + 2]
mov dword [esp + 0x34], eax
mov ax, word [esi]
add esi, 2
cmp ax, cx
jne 0x52cb7d
sub esi, dword [esp + 0x34]
sar esi, 1
cmp dword [esp + 0x18], ecx
jne 0x52cbbc
push esi
push edx
push ebp
call fcn.00632965
add esp, 0xc
test eax, eax
jne 0x52cbba
push ebp
call fcn.0045dcfa
mov ecx, eax
lea eax, [esi + 1]
sub ecx, ebp
sar ecx, 1
cmp ecx, eax
jbe 0x52cefd
xor ecx, ecx
test bl, bl
je 0x52cbcb
mov bl, cl
mov byte [esp + 0x12], bl
call fcn.00475085
push dword [esp + 0x14]
lea eax, [esp + 0x20]
mov ecx, edi
push eax
call fcn.004a26a8
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
mov byte [esp + 0xc0], 4
jae 0x52cbf2
lea eax, [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.DLL_CopyFileW]
push 0
push eax
push ebp
call esi
test eax, eax
jne 0x52ce14
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x52cc15
lea eax, [esp + 0x1c]
push eax
call fcn.0045f74f
test al, al
je 0x52cc3c
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x52cc2e
lea eax, [esp + 0x1c]
push 0
push eax
push ebp
call esi
test eax, eax
jne 0x52ce14
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x14], eax
test bl, bl
jne 0x52cc55
inc bl
mov byte [esp + 0x12], bl
call fcn.00475044
call fcn.00490095
push eax
push 2
lea ecx, [esp + 0x48]
call fcn.0048f892
cmp dword [esp + 0x30], 8
mov esi, dword [esp + 0x1c]
mov byte [esp + 0xc0], 6
jae 0x52cc7d
lea esi, [esp + 0x1c]
push ebp
push 0x6af2ec
lea ecx, [esp + 0x48]
call fcn.004626fb
push esi
mov esi, 0x6af2f0
lea ecx, [esp + 0x44]
push esi
call fcn.004626fb
push dword [esp + 0x14]
lea ecx, [esp + 0x44]
push 0x6a9c7c
call fcn.004626fb
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x94]
call fcn.0048f84b
lea ecx, [esp + 0x40]
mov byte [esp + 0xc0], 8
call fcn.0048f8e2
call fcn.00490095
push eax
push 0x22
lea ecx, [esp + 0x58]
call fcn.0048f892
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
mov byte [esp + 0xc0], 9
jae 0x52ccf8
lea eax, [esp + 0x1c]
push eax
push esi
lea ecx, [esp + 0x58]
call fcn.004626fb
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x6c]
call fcn.0048f84b
lea ecx, [esp + 0x50]
mov byte [esp + 0xc0], 0xb
call fcn.0048f8e2
lea eax, [esp + 0x90]
push eax
call fcn.00491509
test bl, bl
je 0x52cd3e
xor bl, bl
mov byte [esp + 0x12], bl
call fcn.00475085
lea eax, [esp + 0x68]
push eax
lea eax, [esp + 0xa4]
push eax
call fcn.004916a8
cmp dword [eax + 0x14], 8
mov byte [esp + 0xc0], 0xc
jb 0x52cd60
mov eax, dword [eax]
push eax
push 0x689854
push 0x35
call fcn.0049166b
add esp, 0xc
mov byte [esp + 0xc0], 0xb
lea ecx, [esp + 0xa0]
mov esi, eax
push 0
push 1
call fcn.0042341c
cmp esi, 2
je 0x52cddd
test bl, bl
jne 0x52cd9e
inc bl
mov byte [esp + 0x12], bl
call fcn.00475044
lea ecx, [esp + 0x68]
mov byte [esp + 0xc0], 8
call fcn.0048f8e2
lea ecx, [esp + 0x90]
mov byte [esp + 0xc0], 4
call fcn.0048f8e2
xor eax, eax
lea ecx, [esp + 0x1c]
push eax
push 1
mov byte [esp + 0xc8], al
call fcn.0042341c
jmp 0x52cb61
lea ecx, [esp + 0x68]
mov byte [esp + 0xc0], 8
call fcn.0048f8e2
lea ecx, [esp + 0x90]
mov byte [esp + 0xc0], 4
call fcn.0048f8e2
push 0
push 1
lea ecx, [esp + 0x24]
call fcn.0042341c
jmp 0x52cf67
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x52ce23
lea eax, [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push 0x80
push eax
call esi
sub esp, 0x18
lea eax, [esp + 0x34]
mov ecx, esp
push eax
call fcn.00422efb
mov ecx, edi
call fcn.004b2550
test dword [esp + 0xd4], 0x4000
je 0x52ce82
push ebp
lea eax, [esp + 0x54]
push eax
call fcn.004243aa
lea ecx, [esp + 0x1c]
mov byte [esp + 0xc0], 5
push ecx
push eax
mov dword [esp + 0x44], 1
call fcn.0045e390
test al, al
jne 0x52ce82
mov bh, 1
jmp 0x52ce84
xor bh, bh
test byte [esp + 0x3c], 1
mov dword [esp + 0xc0], 4
je 0x52cea3
push 0
push 1
lea ecx, [esp + 0x58]
call fcn.0042341c
test bh, bh
je 0x52ced5
push ebp
push str.Deleting_original_torrent_file__s
call fcn.00409edb
add esp, 8
push 0x80
push ebp
call esi
push ebp
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x52ced5
push ebp
push str.Cant_delete_original_torrent_file__s
call fcn.004790ad
pop ecx
pop ecx
test bl, bl
jne 0x52cee4
inc bl
mov byte [esp + 0x12], bl
call fcn.00475044
xor eax, eax
lea ecx, [esp + 0x1c]
push eax
push 1
mov byte [esp + 0xc8], al
call fcn.0042341c
mov bh, byte [esp + 0x13]
inc dword [0x75f950]
lea eax, [edi + 0x48c]
cmp dword [eax + 0x14], 8
jb 0x52cf13
mov ecx, dword [eax]
jmp 0x52cf15
mov ecx, eax
test ecx, ecx
je 0x52cf2a
cmp dword [eax + 0x14], 8
jb 0x52cf21
mov eax, dword [eax]
push eax
push edi
push 7
call fcn.00483344
mov eax, dword [esp + 0xd4]
shr eax, 1
and al, 1
movzx eax, al
push eax
push edi
call fcn.00488885
test al, al
jne 0x52cf72
cmp dword [esp + 0xd8], 0
je 0x52cf67
mov esi, str.torrent_already_exists
push esi
call fcn.004236bc
pop ecx
mov ecx, dword [esp + 0xd8]
push eax
push esi
call fcn.00434a57
xor eax, eax
mov dword [esp + 0x38], eax
jmp 0x52d023
test bh, bh
je 0x52cf8b
xor eax, eax
push eax
push eax
push 0x8068
push dword [0x792820]
call dword [sym.imp.USER32.dll_PostMessageW]
test byte [esp + 0xd4], 0x40
mov ecx, edi
je 0x52cf9e
call fcn.004ae653
jmp 0x52cfc4
mov eax, dword [edi]
push 0xffffffffffffffff
push 0
call dword [eax + 0x50]
cmp dword [0x75f280], 8
mov eax, dword [0x75f26c]
jae 0x52cfba
mov eax, 0x75f26c
push 0xffffffffffffffff
push eax
mov ecx, edi
call fcn.0049ff36
test byte [esp + 0xd4], 0x10
je 0x52cfe0
or dword [edi + 0x148], 0xffffffff
xor eax, eax
push eax
push eax
mov ecx, edi
call fcn.0049f278
test dword [esp + 0xd4], 0x400
je 0x52cff4
or byte [edi + 0x134], 0x10
xor eax, eax
push eax
push eax
push eax
call fcn.004893e2
test byte [esp + 0xd4], 4
jne 0x52d01e
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x184]
test al, al
jne 0x52d01e
push edi
push 6
call fcn.00489603
mov byte [esp + 0x38], 1
or dword [esp + 0xc0], 0xffffffff
test bl, bl
je 0x52d034
call fcn.00475085
mov ecx, dword [esp + 0xb8]
mov al, byte [esp + 0x38]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10