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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5f6f58
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x64c874]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
push esi
push edi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov ebx, ecx
xor esi, esi
lea edi, [ebx + 0x2f8]
mov dword [esp + 0x14], esi
mov eax, dword [edi + 4]
cmp eax, esi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x50], edi
je 0x4d77c2
mov esi, dword [edi + 8]
sub esi, eax
mov ecx, dword [ebx + 0xa8]
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x4d77d3
xor eax, eax
jmp 0x4d77db
mov eax, dword [ecx + 0x10]
sub eax, edx
sar eax, 5
cmp esi, eax
jbe 0x4d77f8
test edx, edx
jne 0x4d77e7
xor eax, eax
jmp 0x4d77ef
mov eax, dword [ecx + 0x10]
sub eax, edx
sar eax, 5
push 0
mov ecx, edi
call fcn.0046e620
mov eax, dword [ebx + 0xa8]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x4d7809
xor eax, eax
jmp 0x4d7811
mov eax, dword [eax + 0x10]
sub eax, ecx
sar eax, 5
push 1
mov ecx, edi
call fcn.0046e620
mov eax, dword [ebx + 0xa8]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x4d782b
xor eax, eax
jmp 0x4d7833
mov eax, dword [eax + 0x10]
sub eax, ecx
sar eax, 5
lea ecx, [ebx + 0x308]
call fcn.004aed00
mov edx, dword [ebx + 0x50c]
mov esi, dword [ebx + 0xa8]
mov edi, dword [esi + 0x94]
mov ecx, edx
shr ecx, 0x18
and ecx, 0x1f
mov eax, 1
shl eax, cl
mov dword [esp + 0x18], edi
lea ecx, [esp + 0x18]
cmp edi, eax
mov dword [esp + 0x4c], eax
jl 0x4d7873
lea ecx, [esp + 0x4c]
mov ecx, dword [ecx]
xor edi, edi
sar ecx, 1
xor eax, eax
cmp ecx, edi
jle 0x4d7889
nop
sar ecx, 1
add eax, 1
cmp ecx, edi
jg 0x4d7880
shl eax, 0x18
xor eax, edx
and eax, 0x1f000000
xor eax, edx
mov dword [ebx + 0x50c], eax
cmp dword [esi + 0x90], 0x7fffe
jle 0x4d7948
push edi
push 0x611070
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], edi
mov byte [esp + 0x30], 0
call fcn.0040b860
mov dword [esp + 0x158], edi
test byte [0x65b670], 1
jne 0x4d78f9
or dword [0x65b670], 1
push 0x5fbd80
mov dword [0x65b674], 0x6155fc
call fcn.005b89dc
add esp, 4
mov ecx, 0x65b674
mov eax, 0xd
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x24]
push eax
push ecx
mov ecx, ebx
call fcn.004e8170
mov dword [esp + 0x158], 0xffffffff
cmp dword [esp + 0x3c], 0x10
jb 0x4d793b
mov edx, dword [esp + 0x28]
push edx
call fcn.0059b877
add esp, 4
push edi
mov ecx, ebx
call fcn.004e8c90
jmp 0x4d8343
cmp dword [esi + 0x90], edi
jne 0x4d798a
push edi
push 0x611070
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], 0xf
mov dword [esp + 0x40], edi
mov byte [esp + 0x30], 0
call fcn.0040b860
push 9
lea esi, [esp + 0x60]
mov dword [esp + 0x15c], 1
call fcn.004b2660
mov ecx, esi
jmp 0x4d790f
push 0xf0
call fcn.0059b847
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, edi
mov dword [esp + 0x158], 2
je 0x4d7a61
add ebx, 0x1c
lea edi, [esp + 0x5c]
call fcn.00559a50
mov ecx, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
je 0x4d79d7
add eax, 4
mov edx, 1
lock xadd dword [eax], edx
mov edi, dword [esp + 0x58]
sub esp, 0x20
mov dword [esp + 0x178], 4
mov esi, esp
lea ecx, [edi + 0x480]
mov dword [esp + 0x34], 3
mov dword [esp + 0x6c], esp
call fcn.00559c90
mov ecx, dword [edi + 0x4e4]
mov eax, dword [esp + 0x70]
push eax
mov eax, dword [edi + 0x2e8]
shr ecx, 0x1b
and ecx, 3
push ecx
lea edx, [eax + 0x3e8]
add eax, 0x348
push edx
push eax
lea ecx, [edi + 0x3a4]
mov edi, dword [edi + 0xa8]
test edi, edi
push ecx
mov eax, esp
mov dword [esp + 0x80], esp
mov dword [eax], edi
je 0x4d7a4c
mov eax, 1
lock xadd dword [edi], eax
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x50]
push edx
push eax
call fcn.004ca110
mov ebx, dword [esp + 0x58]
jmp 0x4d7a63
xor eax, eax
lea edi, [ebx + 0xac]
mov dword [esp + 0x158], 6
call fcn.004ce370
mov dword [esp + 0x158], 5
test byte [esp + 0x14], 2
je 0x4d7a99
and dword [esp + 0x14], 0xfffffffd
lea eax, [esp + 0x1c]
call fcn.00565750
mov dword [esp + 0x158], 0xffffffff
test byte [esp + 0x14], 1
je 0x4d7ab4
lea eax, [esp + 0x5c]
call fcn.00565750
mov eax, dword [ebx + 0x318]
test eax, eax
mov edi, dword [edi]
mov dword [ebx + 0xb0], edi
je 0x4d7b44
movzx ecx, byte [ebx + 0x50f]
mov edi, dword [ebx + 0xa8]
mov eax, dword [edi + 0x94]
and ecx, 0x1f
mov esi, 1
shl esi, cl
mov ecx, dword [edi + 0x88]
lea eax, [esi + eax - 1]
cdq
idiv esi
mov dword [esp + 0x18], eax
mov eax, esi
cdq
mov esi, eax
mov eax, dword [edi + 0x94]
mov dword [esp + 0x60], edx
cdq
push edx
push eax
mov eax, dword [edi + 0x8c]
push eax
push ecx
call fcn.005ca920
mov ecx, eax
mov eax, dword [esp + 0x60]
add ecx, esi
adc edx, eax
push eax
sub ecx, 1
push esi
sbb edx, 0
push edx
push ecx
call fcn.005c05d0
mov edi, dword [edi + 0x90]
mov edx, dword [esp + 0x18]
push edi
mov edi, dword [ebx + 0x318]
push eax
push edx
call fcn.00550ca0
test byte [ebx + 0x52c], 0x80
je 0x4d7b7d
mov esi, dword [esp + 0x50]
mov edi, dword [esi + 8]
cmp dword [esi + 4], edi
jbe 0x4d7b5e
call fcn.005b8b18
mov esi, dword [esi + 4]
mov eax, dword [esp + 0x50]
cmp esi, dword [eax + 8]
jbe 0x4d7b6f
call fcn.005b8b18
sub edi, esi
push edi
push 0
push esi
call fcn.005be600
add esp, 0xc
push ebx
call fcn.004dfb20
mov esi, dword [ebx + 0xa8]
mov edi, dword [esi + 0xb4]
add esi, 0xac
cmp dword [esi + 4], edi
jbe 0x4d7b9f
call fcn.005b8b18
mov edx, dword [esi + 4]
cmp edx, dword [esi + 8]
mov dword [esp + 0x18], edx
jbe 0x4d7bb4
call fcn.005b8b18
mov edx, dword [esp + 0x18]
mov ecx, dword [ebx + 0xc8]
push edi
push esi
push edx
lea eax, [ebx + 0xc4]
push esi
push ecx
mov ecx, dword [esp + 0x2c]
push eax
push ecx
push eax
call fcn.004f7aa0
test byte [ebx + 0x4e8], 4
je 0x4d7cb2
sub esp, 8
add ebx, 0x1c
mov edi, esp
mov esi, fcn.004e7720
mov dword [esp + 0x20], esp
call fcn.00559a50
xor eax, eax
push eax
lea edx, [esp + 0x30]
push esi
push edx
call fcn.00498260
add esp, 0x14
mov esi, dword [esp + 0x58]
mov dword [esp + 0x158], 7
mov ecx, dword [esi + 0x2e8]
add ecx, 0x374
push ecx
mov ecx, eax
call fcn.00498220
or ebx, 0xffffffff
lea eax, [esp + 0x24]
mov dword [esp + 0x158], ebx
call fcn.00558890
mov eax, dword [esi + 0x458]
xor edi, edi
cmp eax, edi
mov dword [esi + 0x458], edi
mov edx, dword [esi + 0x45c]
mov dword [esi + 0x45c], edi
mov ecx, dword [esi + 0x460]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ecx
mov dword [esi + 0x460], edi
mov dword [esp + 0x158], ebx
je 0x4d7c81
push eax
call fcn.0059b877
add esp, 4
lea ecx, [esi + 0x464]
lea eax, [esp + 0x24]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x24], edi
call fcn.004b2920
lea ecx, [esp + 0x24]
call fcn.00505380
jmp 0x4d8343
push ebx
mov ecx, 7
call fcn.004ecbe0
mov edx, dword [ebx + 0x474]
and edx, 0xe0000000
cmp edx, 0x20000000
jne 0x4d7e9f
lea eax, [ebx + 0x464]
push eax
mov eax, str.file_format
lea ecx, [esp + 0x28]
xor edi, edi
call fcn.00504f80
mov esi, str.libtorrent_resume_file
mov ecx, eax
mov dword [esp + 0x158], 0xa
call fcn.004cff30
lea ecx, [esp + 0x24]
mov byte [esp + 0x4b], al
mov dword [esp + 0x158], 0xffffffff
call fcn.0040b130
cmp byte [esp + 0x4b], 0
je 0x4d7d27
mov edi, 0x1c
lea eax, [ebx + 0x464]
push eax
mov eax, 0x618150
lea ecx, [esp + 0x130]
call fcn.00504f80
test edi, edi
mov dword [esp + 0x158], 0xb
jne 0x4d7d8f
cmp dword [esp + 0x140], edi
jne 0x4d7d5e
mov edi, 0x1d
jmp 0x4d7d8f
mov eax, dword [ebx + 0xa8]
lea ecx, [esp + 0x12c]
lea esi, [esp + 0x24]
lea edi, [eax + 0x140]
call fcn.004d01e0
push eax
mov eax, edi
call fcn.004b29b0
test al, al
je 0x4d7e7b
mov edi, 0x1e
mov esi, dword [ebx + 0x2e8]
add esi, 0x380
call fcn.004f4250
test al, al
je 0x4d7e13
lea eax, [esp + 0x5c]
push eax
mov ecx, ebx
call fcn.004e7a70
mov esi, eax
mov byte [esp + 0x158], 0xc
call fcn.00489480
push esi
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], eax
call fcn.004d37a0
mov byte [esp + 0x158], 0xd
mov edx, dword [ebx + 0x2e8]
push eax
add edx, 0x380
push edx
call fcn.004c4090
lea esi, [esp + 0x74]
mov byte [esp + 0x158], 0xc
call fcn.004d3ad0
lea eax, [esp + 0x5c]
mov byte [esp + 0x158], 0xb
call fcn.004d0760
test edi, edi
je 0x4d7e7b
xor edi, edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea eax, [ebx + 0x454]
lea ecx, [esp + 0x24]
mov byte [esp + 0x158], 0xe
call fcn.004ee650
lea esi, [esp + 0x24]
mov byte [esp + 0x158], 0xb
call fcn.005433f0
lea ecx, [ebx + 0x464]
lea eax, [esp + 0x24]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x24], edi
call fcn.004b2920
lea ecx, [esp + 0x24]
call fcn.00505380
jmp 0x4d7e88
lea edx, [ebx + 0x464]
mov ecx, ebx
call fcn.004e28b0
lea ecx, [esp + 0x12c]
mov dword [esp + 0x158], 0xffffffff
call fcn.0040b130
mov edi, dword [ebx + 0xa8]
mov esi, dword [edi + 0xc]
add edi, 8
cmp esi, dword [edi + 8]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x14], edi
jbe 0x4d7ec1
call fcn.005b8b18
mov dword [esp + 0x20], esi
mov esi, dword [ebx + 0xa8]
mov eax, dword [esi + 0x10]
add esi, 8
cmp dword [esi + 4], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x68], eax
jbe 0x4d7ee3
call fcn.005b8b18
cmp edi, esi
je 0x4d7eec
call fcn.005b8b18
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x68]
je 0x4d8156
cmp eax, dword [edi + 8]
jb 0x4d7f04
call fcn.005b8b18
mov eax, dword [esp + 0x20]
test byte [eax + 0x18], 1
je 0x4d812d
mov ecx, dword [esp + 0x14]
mov esi, eax
cmp esi, dword [ecx + 8]
jb 0x4d7f22
call fcn.005b8b18
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
and ecx, 0xffff
or eax, ecx
je 0x4d812d
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
cmp edx, dword [eax + 8]
jb 0x4d7f48
call fcn.005b8b18
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx + 0x14]
mov esi, dword [ebx + 0x518]
shld edx, eax, 0x10
shl eax, 0x10
mov cl, 0x10
call fcn.005da4b0
mov edi, dword [esp + 0x4c]
mov edx, dword [ebx + 0xa8]
add eax, esi
xor eax, esi
and eax, 0xffffff
xor eax, esi
mov ecx, edi
lea esi, [esp + 0xb4]
mov dword [ebx + 0x518], eax
call fcn.00489730
mov ecx, dword [eax + 0x28]
push ecx
mov ecx, dword [ebx + 0xa8]
push 0
push 0
add ecx, 8
mov eax, edi
lea esi, [esp + 0x30]
call fcn.004ae340
lea esi, [esp + 0xb4]
call fcn.004ad8c0
movzx ecx, byte [ebx + 0x50f]
and ecx, 0x1f
mov edi, 1
shl edi, cl
mov ecx, dword [esp + 0x28]
lea eax, [edi - 1]
and eax, ecx
je 0x4d7fe5
mov edx, eax
sub edx, edi
add dword [esp + 0x2c], edx
mov edx, edi
sub edx, eax
add ecx, edx
mov dword [esp + 0x28], ecx
mov eax, dword [ebx + 0xa8]
mov eax, dword [eax + 0x94]
cdq
idiv edi
mov dword [esp + 0x50], eax
mov eax, ecx
cdq
idiv edi
mov ecx, dword [esp + 0x24]
and ecx, 0x7ffff
movzx esi, ax
shl esi, 0x13
or esi, ecx
cmp dword [esp + 0x2c], edi
jl 0x4d8064
mov edx, esi
shr edx, 0x13
cmp edx, dword [esp + 0x50]
jne 0x4d8032
and esi, 0x7ffff
lea eax, [esi + 1]
xor eax, esi
and eax, 0x7ffff
xor esi, eax
mov eax, dword [ebx + 0x318]
push 0
push esi
call fcn.00554c00
mov eax, dword [esp + 0x2c]
mov ecx, esi
and ecx, 0xfff80000
add ecx, 0x80000
and esi, 0x7ffff
sub eax, edi
xor esi, ecx
cmp eax, edi
mov dword [esp + 0x2c], eax
jge 0x4d8015
mov edx, esi
shr edx, 0x13
cmp edx, dword [esp + 0x50]
jne 0x4d8081
and esi, 0x7ffff
lea eax, [esi + 1]
xor eax, esi
and eax, 0x7ffff
xor esi, eax
cmp dword [esp + 0x2c], 0
jle 0x4d812d
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
cmp edi, dword [eax + 8]
mov dword [esp + 0x54], edi
jb 0x4d80a6
call fcn.005b8b18
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
lea ecx, [edi + 0x20]
mov dword [esp + 0x50], ecx
je 0x4d80bc
call fcn.005b8b18
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x50]
cmp edx, dword [esp + 0x68]
je 0x4d80f4
cmp edi, dword [eax + 8]
mov dword [esp + 0x70], edi
jb 0x4d80d8
call fcn.005b8b18
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x50]
cmp ecx, dword [eax + 8]
jb 0x4d80ea
call fcn.005b8b18
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x50]
test byte [edx + 0x18], 1
jne 0x4d811f
cmp edi, dword [eax + 8]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], edi
jb 0x4d8106
call fcn.005b8b18
mov eax, dword [esp + 0x5c]
cmp eax, dword [esp + 0x18]
je 0x4d8115
call fcn.005b8b18
mov ecx, dword [esp + 0x68]
cmp dword [esp + 0x50], ecx
jne 0x4d812d
mov eax, dword [ebx + 0x318]
push 0
push esi
call fcn.00554c00
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
cmp eax, dword [edx + 8]
jb 0x4d813f
call fcn.005b8b18
add dword [esp + 0x20], 0x20
add dword [esp + 0x4c], 1
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
jmp 0x4d7ee3
test dword [ebx + 0x518], 0xffffff
jbe 0x4d82a1
mov eax, dword [ebx + 0x318]
xor ecx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x158], 0xf
mov edi, dword [eax + 0x38]
cmp edi, dword [eax + 0x3c]
jbe 0x4d8196
call fcn.005b8b18
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 0x3c]
cmp dword [eax + 0x38], esi
jbe 0x4d81ab
call fcn.005b8b18
mov eax, dword [esp + 0x14]
cmp edi, esi
je 0x4d8232
cmp edi, dword [eax + 0x3c]
jb 0x4d81bd
call fcn.005b8b18
mov ecx, dword [ebx + 0x318]
mov edx, dword [ecx + 0x28]
test edx, edx
jne 0x4d81ce
xor eax, eax
jmp 0x4d81d6
mov eax, dword [ecx + 0x2c]
sub eax, edx
sar eax, 3
mov edx, dword [edi + 4]
add edx, 1
cmp edx, eax
jne 0x4d81e5
mov esi, dword [ecx + 0x58]
jmp 0x4d81e8
mov esi, dword [ecx + 0x54]
mov eax, dword [esp + 0x14]
cmp edi, dword [eax + 0x3c]
jb 0x4d81f6
call fcn.005b8b18
movsx ecx, word [edi + 0xc]
cmp ecx, esi
jl 0x4d821c
mov edx, dword [esp + 0x14]
cmp edi, dword [edx + 0x3c]
jb 0x4d820c
call fcn.005b8b18
lea ebx, [edi + 4]
lea esi, [esp + 0x24]
call fcn.004cdd60
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x14]
cmp edi, dword [eax + 0x3c]
jb 0x4d822a
call fcn.005b8b18
add edi, 0x14
jmp 0x4d8196
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
cmp esi, eax
jbe 0x4d8247
call fcn.005b8b18
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x28], eax
mov edi, eax
jbe 0x4d8258
call fcn.005b8b18
mov eax, dword [esp + 0x2c]
cmp esi, edi
je 0x4d8285
cmp esi, eax
jb 0x4d8265
call fcn.005b8b18
mov ecx, dword [esi]
push ecx
mov edi, ebx
call fcn.004dd7a0
mov eax, dword [esp + 0x2c]
cmp esi, eax
jb 0x4d8280
call fcn.005b8b18
mov eax, dword [esp + 0x2c]
add esi, 4
jmp 0x4d8247
mov dword [esp + 0x158], 0xffffffff
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4d82a1
push eax
call fcn.0059b877
add esp, 4
sub esp, 0x10
mov eax, esp
mov dword [esp + 0x28], esp
sub esp, 8
mov dword [esp + 0x30], esp
add ebx, 0x1c
mov edi, esp
mov esi, 0x4d84d0
mov dword [esp + 0x30], eax
call fcn.00559a50
movzx edx, byte [0x65af15]
xor eax, eax
push eax
movzx eax, byte [0x65af19]
push esi
push edx
push eax
mov eax, dword [esp + 0x40]
push eax
call fcn.0055aa00
add esp, 0x1c
lea edi, [esp + 0x84]
call fcn.004f48e0
mov eax, dword [esp + 0x58]
mov ecx, edi
mov dword [esp + 0x158], 0x10
mov esi, dword [eax + 0xb0]
push ecx
lea ebx, [eax + 0x464]
call fcn.004caa20
mov dword [esp + 0x158], 0xffffffff
mov eax, dword [esp + 0x74]
test eax, eax
je 0x4d8343
test al, 1
jne 0x4d8343
and eax, 0xfffffffe
mov eax, dword [eax]
test eax, eax
je 0x4d8343
lea edx, [esp + 0x7c]
push 2
push edx
mov ecx, edx
push ecx
call eax
add esp, 0xc
mov ecx, dword [esp + 0x150]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.005b88a9
mov esp, ebp
pop ebp
ret