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

Disassembly:
push ebp
sub esp, 0x5c
mov eax, 0x6a7f45
call fcn.006426c4
sub esp, 0x40
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp + 0x3c], ebx
mov dword [ebp + 0x34], ebx
call fcn.004953ad
mov eax, dword [0x7b1018]
inc dword [0x7b10d8]
inc dword [0x7b0ff8]
push ebx
inc dword [eax]
call fcn.00495a63
mov esi, dword [ebp + 0x68]
mov dword [0x7b103c], eax
cmp byte [0x7b10a8], bl
jne 0x4d1c0c
mov eax, dword [0x7b1024]
push ebx
inc dword [eax]
call fcn.00495a63
mov dword [0x7b103c], eax
call fcn.00495890
jmp 0x4d1c19
mov byte [esi + 0xa5], 1
mov byte [0x7b10a8], bl
mov bl, 1
mov byte [ebp + 0x6b], bl
call fcn.00479151
mov eax, dword [esi]
mov ecx, esi
and dword [ebp - 4], 0
call dword [eax + 0x34]
push eax
call fcn.0048d5e2
test eax, eax
je 0x4d1c5d
cmp dword [ebp + 0x74], 0
je 0x4d219e
mov esi, str.torrent_already_exists
push esi
call fcn.00428864
pop ecx
mov ecx, dword [ebp + 0x74]
push eax
push esi
call fcn.00439135
jmp 0x4d219e
test dword [ebp + 0x70], 0x200
mov edi, dword [0x7b5aa4]
mov dword [ebp + 0x58], edi
je 0x4d1d63
xor eax, eax
cmp dword [esi + 0x20c], eax
je 0x4d2096
push eax
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00460dc6
push 0xc4
mov byte [ebp - 4], 2
call fcn.00642424
pop ecx
mov dword [ebp + 0x30], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x4d1caf
mov ecx, eax
call fcn.00466f4c
jmp 0x4d1cb1
xor eax, eax
mov byte [ebp - 4], 2
mov dword [ebp + 0x5c], eax
test eax, eax
je 0x4d1cc5
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 0x4d1cdd
push 0xffffffffffffffff
push 0
push eax
call fcn.00428762
push 0x4c
call fcn.00460621
push 0x4c
mov edi, eax
push 0
push edi
call fcn.0065d010
lea ecx, [edi + 0x18]
add esp, 0xc
lea eax, [ebp - 0x34]
cmp ecx, eax
je 0x4d1d07
push 0xffffffffffffffff
push 0
push eax
call fcn.00428762
push dword [ebp + 0x6c]
lea eax, [ebp + 0x40]
push eax
call fcn.0047e83e
push eax
mov ecx, edi
call fcn.0040ef82
push 0
push 1
lea ecx, [ebp + 0x40]
call fcn.0040f95f
lea ecx, [esi + 0x1fc]
cmp dword [ecx + 0x14], 0x10
jb 0x4d1d35
mov ecx, dword [ecx]
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp + 0x5c]
push eax
push 0x4d2315
push edi
push ecx
call fcn.00467be1
mov eax, dword [ebp + 0x5c]
mov byte [ebp - 4], 5
test eax, eax
je 0x4d1d5b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [ebp - 0x34]
jmp 0x4d2086
mov eax, dword [ebp + 0x70]
and eax, 0x10000
mov dword [ebp + 0x30], eax
test eax, eax
jne 0x4d2093
call fcn.0048d34b
push eax
call fcn.0048d351
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 0x4d1d90
sub edi, dword [ebp + 0x5c]
sar edi, 1
test dword [ebp + 0x70], 0x100
jne 0x4d1dd6
push edi
push edx
push dword [ebp + 0x6c]
call fcn.00667f25
add esp, 0xc
test eax, eax
jne 0x4d1dd4
push dword [ebp + 0x6c]
call fcn.00460cab
mov ecx, eax
lea eax, [edi + 1]
sub ecx, dword [ebp + 0x6c]
sar ecx, 1
cmp ecx, eax
jbe 0x4d2093
xor ecx, ecx
test bl, bl
je 0x4d1de4
mov bl, cl
mov byte [ebp + 0x6b], bl
call fcn.00479192
push dword [ebp + 0x38]
lea eax, [ebp + 0x40]
mov ecx, esi
push eax
call fcn.004a7c19
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
mov byte [ebp - 4], 6
jae 0x4d1e02
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 0x4d1fc7
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
jae 0x4d1e23
lea eax, [ebp + 0x40]
push eax
call fcn.004626bc
test al, al
je 0x4d1e4b
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
jae 0x4d1e39
lea eax, [ebp + 0x40]
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
test eax, eax
jne 0x4d1fc7
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 0x38], eax
test bl, bl
jne 0x4d1e62
inc bl
mov byte [ebp + 0x6b], bl
call fcn.00479151
call fcn.00493cf6
push eax
push 2
lea ecx, [ebp + 0x20]
call fcn.00493752
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
mov byte [ebp - 4], 8
jae 0x4d1e82
lea eax, [ebp + 0x40]
push edi
push 0x6df494
lea ecx, [ebp + 0x20]
mov dword [ebp + 0x5c], eax
call fcn.0049a954
push dword [ebp + 0x5c]
mov edi, 0x6df498
lea ecx, [ebp + 0x20]
push edi
call fcn.0049a954
push dword [ebp + 0x38]
lea ecx, [ebp + 0x20]
push 0x6df0bc
call fcn.0049a954
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00493707
lea ecx, [ebp + 0x20]
mov byte [ebp - 4], 0xa
call fcn.00493803
call fcn.00493cf6
push eax
push 0x22
lea ecx, [ebp + 0x10]
call fcn.00493752
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
mov byte [ebp - 4], 0xb
jae 0x4d1eec
lea eax, [ebp + 0x40]
push eax
push edi
lea ecx, [ebp + 0x10]
call fcn.0049a954
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp]
call fcn.00493707
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0xd
call fcn.00493803
lea eax, [ebp - 0x1c]
push eax
call fcn.00495553
test bl, bl
je 0x4d1f25
xor bl, bl
mov byte [ebp + 0x6b], bl
call fcn.00479192
test byte [ebp + 0x70], 4
jne 0x4d1f68
lea eax, [ebp]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.0049570a
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 0xe
jb 0x4d1f44
mov eax, dword [eax]
push eax
push 0x6c408c
push 0x35
call fcn.004956cd
add esp, 0xc
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x4c]
mov edi, eax
push 0
push 1
call fcn.004285f6
jmp 0x4d1f6b
xor edi, edi
inc edi
cmp edi, 2
je 0x4d1fa6
test bl, bl
jne 0x4d1f7e
inc bl
mov byte [ebp + 0x6b], bl
call fcn.00479151
lea ecx, [ebp]
call fcn.00493803
lea ecx, [ebp - 0x1c]
call fcn.00493803
xor eax, eax
lea ecx, [ebp + 0x40]
push eax
push 1
mov byte [ebp - 4], al
call fcn.004285f6
mov eax, dword [ebp + 0x30]
jmp 0x4d1d6e
lea ecx, [ebp]
call fcn.00493803
lea ecx, [ebp - 0x1c]
call fcn.00493803
push 0
push 1
lea ecx, [ebp + 0x40]
call fcn.004285f6
jmp 0x4d20f4
cmp dword [ebp + 0x54], 8
mov eax, dword [ebp + 0x40]
jae 0x4d1fd3
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.00427fbe
mov ecx, esi
call fcn.004b7962
test dword [ebp + 0x70], 0x4000
je 0x4d2024
push edi
lea eax, [ebp - 0x4c]
push eax
call fcn.00429756
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 7
push ecx
push eax
mov dword [ebp + 0x34], 1
call fcn.00461314
test al, al
jne 0x4d2024
mov bh, 1
jmp 0x4d2026
xor bh, bh
test byte [ebp + 0x34], 1
mov dword [ebp - 4], 6
je 0x4d203f
push 0
push 1
lea ecx, [ebp - 0x4c]
call fcn.004285f6
test bh, bh
je 0x4d2075
push edi
push str.Deleting_original_torrent_file__s
call fcn.0040e6e4
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 0x4d2075
push edi
push str.Cant_delete_original_torrent_file__s
call fcn.0047d5f0
pop ecx
pop ecx
test bl, bl
jne 0x4d2083
inc bl
mov byte [ebp + 0x6b], bl
call fcn.00479151
lea ecx, [ebp + 0x40]
xor eax, eax
push eax
push 1
mov byte [ebp - 4], al
call fcn.004285f6
mov edi, dword [ebp + 0x58]
inc dword [0x7b1078]
lea eax, [esi + 0x528]
cmp dword [eax + 0x14], 8
jb 0x4d20ac
mov ecx, dword [eax]
jmp 0x4d20ae
mov ecx, eax
test ecx, ecx
je 0x4d20c3
cmp dword [eax + 0x14], 8
jb 0x4d20ba
mov eax, dword [eax]
push eax
push esi
push 7
call fcn.00487e3c
mov eax, dword [ebp + 0x70]
shr eax, 1
and al, 1
movzx eax, al
push eax
push esi
call fcn.0048cfeb
test al, al
jne 0x4d20fe
cmp dword [ebp + 0x74], 0
je 0x4d20f4
mov esi, str.torrent_already_exists
push esi
call fcn.00428864
pop ecx
mov ecx, dword [ebp + 0x74]
push eax
push esi
call fcn.00439135
xor eax, eax
mov dword [ebp + 0x3c], eax
jmp 0x4d219e
test edi, edi
jne 0x4d2117
xor eax, eax
push eax
push eax
push 0x8068
push dword [0x7e6a30]
call dword [sym.imp.USER32.dll_PostMessageW]
test byte [ebp + 0x70], 0x40
mov ecx, esi
je 0x4d2126
call fcn.004b38da
jmp 0x4d214c
mov eax, dword [esi]
push 0xffffffffffffffff
push 0
call dword [eax + 0x50]
cmp dword [0x7b097c], 8
mov eax, dword [0x7b0968]
jae 0x4d2142
mov eax, 0x7b0968
push 0xffffffffffffffff
push eax
mov ecx, esi
call fcn.004a555f
test byte [ebp + 0x70], 0x10
je 0x4d2164
or dword [esi + 0x158], 0xffffffff
xor eax, eax
push eax
push eax
mov ecx, esi
call fcn.004a4916
test dword [ebp + 0x70], 0x400
je 0x4d2174
or byte [esi + 0x144], 0x10
xor eax, eax
push eax
push eax
push eax
call fcn.0048d74d
test byte [ebp + 0x70], 4
jne 0x4d219a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x184]
test al, al
jne 0x4d219a
push esi
push 6
call fcn.0048d97a
mov byte [ebp + 0x3c], 1
mov dword [ebp - 4], 0x11
test bl, bl
je 0x4d21ae
call fcn.00479192
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