Function at 0x4dd7a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5ed706
mov eax, dword fs:[0]
push eax
sub esp, 0xe4
push ebx
push ebp
push esi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0xf4]
mov dword fs:[0], eax
mov ecx, dword [edi + 0xa8]
mov eax, dword [ecx + 0x94]
mov ebx, dword [esp + 0x104]
imul ebx
push edx
mov dword [esp + 0x28], eax
push eax
lea eax, [ecx + 8]
lea esi, [esp + 0x20]
mov dword [esp + 0x30], edx
call fcn.004add50
mov ecx, dword [edi + 0xa8]
mov eax, dword [ecx + 0x90]
lea edx, [eax - 1]
cmp ebx, edx
jne 0x4dd82b
mov edx, dword [ecx + 0x94]
mov esi, dword [ecx + 0x88]
mov ebx, dword [ecx + 0x8c]
add eax, 0xffffffff
imul edx
sub esi, eax
sbb ebx, edx
mov dword [esp + 0x50], ebx
jmp 0x4dd831
mov esi, dword [ecx + 0x94]
mov ebp, dword [ecx + 0xc]
cmp ebp, dword [ecx + 0x10]
lea ebx, [ecx + 8]
mov dword [esp + 0x20], esi
jbe 0x4dd845
call fcn.005b8b18
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4dd851
cmp eax, ebx
je 0x4dd856
call fcn.005b8b18
mov ebx, dword [esp + 0x1c]
mov eax, ebx
sub eax, ebp
sar eax, 5
test esi, esi
mov dword [esp + 0x14], eax
jle 0x4ddbac
cmp dword [esp + 0x18], 0
jne 0x4dd879
call fcn.005b8b18
mov eax, dword [esp + 0x18]
cmp ebx, dword [eax + 8]
jb 0x4dd887
call fcn.005b8b18
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
shld edx, eax, 0x10
shl eax, 0x10
mov cl, 0x10
call fcn.005da4b0
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
sub esi, eax
mov eax, dword [esp + 0x20]
sbb ebp, edx
cmp ebx, dword [ecx + 8]
cdq
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
jb 0x4dd8c2
call fcn.005b8b18
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
shld edx, eax, 0x10
shl eax, 0x10
mov cl, 0x10
call fcn.005da4b0
sub eax, esi
sbb edx, ebp
cmp dword [esp + 0x30], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
jg 0x4dd8f6
jl 0x4dd8f0
cmp dword [esp + 0x2c], eax
jae 0x4dd8f6
lea eax, [esp + 0x2c]
jmp 0x4dd8fa
lea eax, [esp + 0x44]
mov ecx, dword [edi + 0x30c]
test ecx, ecx
mov esi, dword [eax]
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x3c], esi
je 0x4dd91d
mov eax, dword [edi + 0x310]
sub eax, ecx
sar eax, 3
cmp ebp, eax
jb 0x4dd922
call fcn.005b8b18
mov edx, dword [edi + 0x30c]
lea ecx, [ebp*8]
mov dword [esp + 0x40], ecx
add ecx, edx
mov eax, esi
cdq
add dword [ecx], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
adc dword [ecx + 4], edx
mov eax, dword [edi + 0xa8]
lea ecx, [esp + 0x74]
push ecx
lea edx, [eax + 8]
mov ecx, ebp
call fcn.004ae130
mov esi, eax
mov eax, dword [edi + 0x30c]
test eax, eax
je 0x4dd975
mov ecx, dword [edi + 0x310]
sub ecx, eax
sar ecx, 3
cmp ebp, ecx
jb 0x4dd97a
call fcn.005b8b18
mov eax, dword [edi + 0x30c]
mov ecx, dword [esp + 0x40]
mov edx, dword [ecx + eax + 4]
cmp edx, dword [esi + 0x2c]
jl 0x4dd99e
jg 0x4dd997
mov eax, dword [ecx + eax]
cmp eax, dword [esi + 0x28]
jb 0x4dd99e
mov byte [esp + 0x13], 1
jmp 0x4dd9a3
mov byte [esp + 0x13], 0
mov esi, 0x10
cmp dword [esp + 0xe4], esi
jb 0x4dd9c1
mov ecx, dword [esp + 0xd0]
push ecx
call fcn.0059b877
add esp, 4
cmp dword [esp + 0x8c], esi
mov ebp, 0xf
mov dword [esp + 0xe4], ebp
mov dword [esp + 0xe0], 0
mov byte [esp + 0xd0], 0
jb 0x4dd9f6
mov edx, dword [esp + 0x78]
push edx
call fcn.0059b877
add esp, 4
cmp byte [esp + 0x13], 0
je 0x4ddb6f
mov eax, dword [edi + 0xa8]
lea ecx, [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [eax + 8]
call fcn.004ae130
mov bl, byte [eax + 0x54]
not bl
and bl, 1
cmp dword [esp + 0xe4], esi
jb 0x4dda39
mov edx, dword [esp + 0xd0]
push edx
call fcn.0059b877
add esp, 4
cmp dword [esp + 0x8c], esi
mov dword [esp + 0xe4], ebp
mov dword [esp + 0xe0], 0
mov byte [esp + 0xd0], 0
jb 0x4dda69
mov eax, dword [esp + 0x78]
push eax
call fcn.0059b877
add esp, 4
test bl, bl
je 0x4ddb6b
mov esi, dword [edi + 0x2e8]
add esi, 0x380
lea ebp, [esi + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x10]
cmp eax, dword [esi + 0x30]
push ebp
jb 0x4dda9b
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4ddb6b
mov ebx, dword [esi + 0x2c]
shr ebx, 7
and bl, 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
je 0x4ddb6b
lea ecx, [esp + 0x4c]
push ecx
mov ecx, edi
call fcn.004e7a70
mov dword [esp + 0xfc], 0
mov edx, dword [0x65ae48]
mov ecx, dword [0x65ae4c]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x54], vtable.libtorrent::torrent_alert.0
mov edx, dword [eax]
mov dword [esp + 0x64], edx
mov eax, dword [eax + 4]
test eax, eax
mov dword [esp + 0x68], eax
je 0x4ddb02
add eax, 8
mov ecx, 1
lock xadd dword [eax], ecx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x54], vtable.libtorrent::file_completed_alert.0
mov dword [esp + 0x6c], edx
mov byte [esp + 0xfc], 1
mov ecx, dword [edi + 0x2e8]
lea eax, [esp + 0x54]
push eax
add ecx, 0x380
push ecx
call fcn.004c4090
lea edx, [esp + 0x54]
push edx
mov byte [esp + 0x100], 0
call fcn.004c2120
mov dword [esp + 0xfc], 0xffffffff
mov eax, dword [esp + 0x50]
test eax, eax
je 0x4ddb6b
mov ecx, eax
add eax, 8
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x4ddb6b
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
sub dword [esp + 0x20], eax
mov ecx, dword [esp + 0x34]
add dword [esp + 0x24], ecx
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
adc dword [esp + 0x28], edx
cmp ebx, dword [eax + 8]
jb 0x4ddb95
call fcn.005b8b18
add dword [esp + 0x14], 1
add ebx, 0x20
cmp dword [esp + 0x20], 0
mov dword [esp + 0x1c], ebx
jg 0x4dd86d
mov ecx, dword [esp + 0x104]
mov edx, dword [edi + 0x318]
push ecx
push edx
call fcn.00552640
mov ecx, dword [esp + 0xf4]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
add esp, 0xf0
ret 4