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

Disassembly:
push ebp
mov ebp, edx
push edi
push esi
push ebx
sub esp, 0xbc
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0xd0]
mov dword [esp + 0x38], eax
mov eax, 1
mov dword [esp + 0x50], ecx
test edx, edx
je 0x665f5d58
test ebp, ebp
je 0x665f6310
lea edx, [esp + 0x6c]
xor eax, eax
lea esi, [esi]
lea esi, [esi]
cmp dword [ebp + 0x18], ecx
ja 0x665f5d4b
lea edx, [ebp + 0x10]
add eax, 1
mov ebp, dword [ebp + 0x10]
mov dword [edx], ebp
test ebp, ebp
jne 0x665f5d40
mov ebp, dword [esp + 0x6c]
mov edi, dword [esp + 0x38]
add dword [edi + 0xc0], eax
cmp dword [ebp + 0x18], 1
je 0x665f6280
mov ebx, dword [esp + 0x38]
mov edi, dword [ebx + 0x98]
movzx eax, byte [ebx + 0xb]
mov dword [esp + 0x48], edi
mov edi, dword [ebx + 0xd8]
mov byte [esp + 0x40], al
mov eax, dword [edi + 0x20]
mov ebx, dword [eax]
lea eax, [edi + 0x34]
mov dword [esp + 8], 0x30
mov dword [esp], eax
mov dword [esp + 4], ebx
call sub.msvcrt.dll_memcmp
mov dword [esp + 0x28], 0
test eax, eax
je 0x665f5dba
mov eax, dword [ebx + 0x10]
add eax, 1
mov dword [esp + 0x28], eax
cmp word [edi + 0x28], 0
jne 0x665f5e35
mov eax, dword [ebx + 0x60]
test eax, eax
jne 0x665f62b0
movzx eax, byte [edi + 0x2b]
test al, al
jne 0x665f5df7
mov eax, dword [edi + 4]
mov edx, dword [eax]
mov dword [esp + 0xc], 5
mov dword [esp + 8], 1
mov dword [esp + 4], 3
mov dword [esp], eax
call dword [edx + 0x38]
mov eax, 0xffffffff
lea edx, [esp + 0x90]
xor esi, esi
mov word [edi + 0x28], ax
mov ebx, edx
lea esi, [esi]
nop
add esi, 1
mov ecx, 1
mov edx, ebx
mov eax, edi
mov dword [esp], esi
call fcn.665f54c0
cmp eax, 0xffffffff
je 0x665f5e10
mov dword [esp + 0x30], eax
test eax, eax
jne 0x665f61f2
movzx eax, byte [esp + 0x40]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x44]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x665f60f0
mov eax, dword [edi + 8]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x78], edi
lea ebx, [eax + 0x18]
mov dword [esp + 0x8c], eax
mov eax, ebx
mov dword [esp + 0x60], ebx
cdq
mov eax, esi
mov dword [esp + 0x20], ebx
mov ecx, edx
mov dword [esp + 0x24], edx
mul ebx
imul ecx, esi
mov dword [esp + 0x30], edi
mov esi, ebp
mov dword [esp + 0x54], ebp
add edx, ecx
add eax, 0x20
adc edx, 0
mov ecx, edx
mov edx, eax
mov eax, dword [esp + 0xd0]
mov edi, edx
mov ebp, ecx
xor eax, 1
and eax, 1
mov byte [esp + 0x4c], al
lea esi, [esi]
lea esi, [esi]
mov ebx, dword [esp + 0x28]
mov edx, dword [esi + 0x18]
test ebx, ebx
je 0x665f6083
mov ecx, dword [esi + 0x10]
test ecx, ecx
jne 0x665f5f01
cmp byte [esp + 0x4c], 0
je 0x665f6270
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x90]
mov dword [esp + 0x90], 0
call fcn.665b25c0
mov ecx, dword [esp + 0x90]
cmp ecx, dword [esp + 0x28]
jb 0x665f6080
mov ebx, dword [esp + 0x24]
lea eax, [ecx - 1]
imul ebx, eax
mul dword [esp + 0x20]
add edx, ebx
mov ebx, dword [esp + 0x30]
add eax, 0x38
adc edx, 0
mov ebx, dword [ebx + 0x68]
cmp ecx, ebx
jb 0x665f5f52
test ebx, ebx
jne 0x665f5f59
mov ebx, dword [esp + 0x30]
mov dword [ebx + 0x68], ecx
mov ebx, dword [esp + 0x30]
mov ecx, dword [ebx + 8]
mov ebx, dword [ecx]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
mov eax, dword [esi + 4]
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [ebx + 0xc]
test eax, eax
jne 0x665f6253
and word [esi + 0x1c], 0xffbf
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x665f5ee0
lea esi, [esi]
nop
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], ebp
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x54]
test eax, eax
je 0x665f63e0
mov eax, dword [edi + 0x68]
test eax, eax
jne 0x665f6488
movzx eax, byte [esp + 0x40]
and eax, 3
mov byte [esp + 0x28], al
jne 0x665f6438
mov dword [esp + 0x28], 0
cmp byte [edi + 0x2f], 0
je 0x665f66d4
mov eax, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
mov dword [esp + 0x30], 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
test edx, edx
js 0x665f67e4
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
add eax, dword [esp + 0x28]
imul ecx, eax
mul dword [esp + 0x60]
add edx, ecx
mov ebx, eax
add ebx, 0x1f
mov esi, edx
adc esi, 0
cmp ebx, dword [esp + 0x40]
mov ebx, esi
sbb ebx, dword [esp + 0x44]
jl 0x665f6045
add eax, 0x20
adc edx, 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov eax, edi
call fcn.665af7c0
mov byte [edi + 0x2f], 0
mov eax, dword [edi + 0x44]
mov esi, dword [esp + 0x30]
mov ecx, eax
test esi, esi
jne 0x665f61f2
mov ebx, dword [esp + 0x28]
test ebx, ebx
setg byte [esp + 0x2c]
jmp 0x665f63f2
mov edx, dword [esi + 0x18]
mov eax, dword [esp + 0xd0]
add dword [esp + 0x2c], 1
xor ecx, ecx
test eax, eax
jne 0x665f60e0
mov ebx, dword [esi + 4]
mov dword [esp], ecx
lea eax, [esp + 0x78]
mov ecx, edx
mov dword [esp + 4], edi
mov dword [esp + 8], ebp
mov edx, ebx
call fcn.66593aa0
test eax, eax
jne 0x665f6253
add edi, dword [esp + 0x20]
adc ebp, dword [esp + 0x24]
mov dword [esp + 0x3c], esi
or word [esi + 0x1c], 0x40
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x665f5ee0
jmp 0x665f5fa0
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x665f6095
mov ecx, dword [esp + 0x50]
jmp 0x665f6095
mov eax, dword [esp + 0x48]
mov dword [esp + 0x30], 0x82067f37
mov ecx, 0x9ae8ac37
mov dword [esp + 0x90], 0x82067f37
mov dword [esp + 0x94], 0x18e22d00
bswap eax
mov dword [esp + 0x98], eax
mov ebx, dword [edi + 0x70]
mov edx, ebx
bswap edx
mov dword [esp + 0x9c], edx
test ebx, ebx
je 0x665f6388
mov ebx, dword [edi + 0x54]
add eax, dword [esp + 0x30]
add edx, ecx
mov esi, dword [edi + 0x58]
add eax, ecx
add edx, eax
add eax, ebx
mov dword [esp + 0xa0], ebx
mov ebx, dword [esp + 0x48]
add eax, edx
add edx, esi
mov dword [esp + 0xa4], esi
add edx, eax
mov ecx, eax
bswap ecx
mov dword [esp + 0xa8], ecx
mov ecx, edx
bswap ecx
mov dword [esp + 0xac], ecx
lea ecx, [esp + 0x90]
mov dword [edi + 0x4c], eax
mov eax, dword [edi + 8]
mov byte [edi + 0x41], 0
mov dword [edi + 0x50], edx
mov byte [edi + 0x2f], 1
mov edx, dword [eax]
mov dword [edi + 0x24], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x20
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0xc]
mov dword [esp + 0x30], eax
test eax, eax
jne 0x665f61f2
cmp byte [edi + 0x30], 0
je 0x665f5e4d
mov eax, dword [esp + 0x20]
sar eax, 2
and eax, 3
je 0x665f5e4d
mov edx, dword [edi + 8]
mov ecx, dword [edx]
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [ecx + 0x14]
mov dword [esp + 0x30], eax
test eax, eax
je 0x665f5e4d
mov eax, dword [esp + 0x30]
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [esp + 0x2c], 0
mov esi, ebp
mov ecx, ebp
mov dword [esp + 0x30], ebx
mov ebp, dword [esp + 0x20]
je 0x665f682d
test al, al
je 0x665f682d
mov ebp, dword [esp + 0x3c]
mov ebx, esi
jmp 0x665f6238
test ecx, ecx
jle 0x665f6638
mov ecx, dword [ebp + 0x18]
add esi, 1
mov eax, edi
mov edx, esi
call fcn.665aff20
mov ecx, dword [esp + 0x28]
sub ecx, esi
add ecx, ebx
test eax, eax
je 0x665f6230
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x30]
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret
add dword [esp + 0x2c], 1
mov ecx, dword [esp + 0x50]
jmp 0x665f6095
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 4]
mov eax, dword [eax + 0x68]
bswap eax
add eax, 1
bswap eax
mov dword [edx + 0x18], eax
mov edx, dword [ebp + 4]
mov dword [edx + 0x5c], eax
mov eax, dword [ebp + 4]
mov dword [eax + 0x60], 0x7d4f2e00
jmp 0x665f5d6c
mov eax, dword [0x6667ced0]
test eax, eax
jne 0x665f6320
call fcn.66587320
test eax, eax
jne 0x665f62cb
call fcn.665cb300
test eax, eax
je 0x665f6325
cmp byte [edi + 0x2b], 0
jne 0x665f6340
mov eax, dword [edi + 4]
mov edx, dword [eax]
mov dword [esp + 0xc], 0xa
mov dword [esp + 8], 4
mov dword [esp + 4], 4
mov dword [esp], eax
call dword [edx + 0x38]
mov dword [esp + 0x30], eax
test eax, eax
je 0x665f6340
cmp dword [esp + 0x30], 5
jne 0x665f61f2
jmp 0x665f5dcc
xor eax, eax
jmp 0x665f5d58
lock or dword [esp], 0
lea edx, [esp + 0x90]
mov eax, 4
call fcn.665d6340
jmp 0x665f62cb
mov edx, dword [esp + 0x90]
mov eax, edi
call fcn.6658f2b0
cmp byte [edi + 0x2b], 0
jne 0x665f5df7
mov eax, dword [edi + 4]
mov edx, dword [eax]
mov dword [esp + 0xc], 9
mov dword [esp + 8], 4
mov dword [esp + 4], 4
mov dword [esp], eax
call dword [edx + 0x38]
movzx eax, byte [edi + 0x2b]
jmp 0x665f5dd0
mov esi, dword [0x6667ced0]
test esi, esi
jne 0x665f66ca
call fcn.66587320
test eax, eax
jne 0x665f63b5
call fcn.665cb300
test eax, eax
jne 0x665f63b5
lea edx, [edi + 0x54]
mov eax, 8
call fcn.665d6340
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x30], eax
add ecx, eax
mov eax, dword [esp + 0x98]
jmp 0x665f6136
mov eax, dword [edi + 0x44]
mov dword [esp + 0x28], 0
mov byte [esp + 0x2c], 0
mov ecx, eax
mov dword [esp + 0x20], ebp
mov esi, ebp
mov ebp, ecx
jmp 0x665f6429
add ebp, 1
mov ecx, dword [esi + 0x18]
mov eax, edi
mov edx, ebp
call fcn.665aff20
test eax, eax
mov ebx, eax
sete al
mov esi, dword [esi + 0x10]
test esi, esi
je 0x665f6208
test al, al
je 0x665f6208
test byte [esi + 0x1c], 0x40
jne 0x665f6400
mov eax, 1
xor ebx, ebx
jmp 0x665f6416
cmp byte [edi + 0x31], 0
jne 0x665f66e9
mov eax, dword [esp + 0x7c]
movzx ebx, byte [esp + 0x28]
mov edx, dword [eax]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x14]
cmp byte [edi + 0x2f], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], eax
je 0x665f6058
mov eax, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
test edx, edx
jns 0x665f600c
jmp 0x665f6058
mov eax, dword [edi + 0x24]
add eax, 0x18
mov dword [esp], eax
mov dword [esp + 0x4c], eax
call sym.libsqlite3_0.dll_sqlite3_malloc
mov dword [esp + 0x64], eax
test eax, eax
je 0x665f67fb
mov eax, dword [edi + 0x68]
mov ecx, 0x18
xor ebx, ebx
cmp eax, 1
je 0x665f64d4
mov esi, dword [esp + 0x4c]
sub eax, 2
mov ebx, esi
sar ebx, 0x1f
mov ecx, ebx
imul ecx, eax
mul esi
add edx, ecx
add eax, 0x30
adc edx, 0
mov ecx, eax
mov ebx, edx
mov eax, dword [edi + 8]
mov edx, dword [eax]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x64]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 8
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 8]
mov esi, dword [edi + 0x68]
mov dword [esp + 0x30], eax
mov edx, eax
mov eax, dword [ebx]
bswap eax
mov dword [edi + 0x4c], eax
mov eax, dword [ebx + 4]
mov dword [edi + 0x68], 0
bswap eax
mov dword [edi + 0x50], eax
cmp dword [esp + 0x2c], esi
jb 0x665f6618
test edx, edx
jne 0x665f6618
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x28], esi
mov dword [esp + 0x68], ebp
mov dword [esp + 0x30], eax
sar eax, 0x1f
mov dword [esp + 0x34], eax
mov eax, ebx
lea ebx, [ebx + 0x18]
mov dword [esp + 0x54], ebx
mov ebp, eax
lea esi, [esi]
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
sub eax, 1
mov ecx, esi
imul ecx, eax
mul ebx
add edx, ecx
add eax, 0x20
mov ecx, dword [esp + 0x4c]
mov ebx, eax
mov eax, dword [edi + 8]
adc edx, 0
mov esi, edx
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 8], ecx
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [edx + 8]
test eax, eax
je 0x665f65b0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
jmp 0x665f61f2
lea eax, [esp + 0x90]
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
bswap edx
bswap ecx
mov dword [esp], eax
mov eax, edi
call fcn.66587790
mov eax, dword [edi + 8]
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
lea ebx, [esp + 0x90]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 8], 0x18
mov dword [esp], eax
call dword [edx + 0xc]
add dword [esp + 0x28], 1
mov ebx, dword [esp + 0x28]
test eax, eax
jne 0x665f6610
cmp dword [esp + 0x2c], ebx
jae 0x665f6550
mov dword [esp + 0x30], eax
mov ebp, dword [esp + 0x68]
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x30]
test eax, eax
je 0x665f5fca
jmp 0x665f61f2
mov dword [esp + 0x30], eax
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
test ecx, ecx
jne 0x665f61f2
mov ebx, dword [esp + 0x48]
mov edx, dword [esp + 0xd0]
mov dword [edi + 0x44], esi
mov eax, ebx
sar ebx, 0x10
xor al, al
or eax, ebx
mov word [edi + 0x42], ax
test edx, edx
je 0x665f6680
mov eax, dword [esp + 0x50]
add dword [edi + 0x3c], 1
mov dword [edi + 0x48], eax
mov eax, edi
call fcn.6658f1b0
mov dword [edi + 0xc], esi
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x58]
test eax, eax
je 0x665f61f2
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x38]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 0x18]
call fcn.665dd9b0
mov ebp, dword [ebp + 0x10]
test ebp, ebp
je 0x665f66b7
mov eax, dword [esi + 0x58]
test eax, eax
jne 0x665f6697
mov ebp, dword [ebp + 0x10]
test ebp, ebp
jne 0x665f66a9
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x30]
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret
lock or dword [esp], 0
jmp 0x665f63a8
mov eax, dword [edi + 0x44]
mov ecx, eax
mov eax, dword [esp + 0x28]
test eax, eax
setg byte [esp + 0x2c]
jmp 0x665f63f2
mov edx, dword [edi + 8]
mov eax, dword [edx]
mov eax, dword [eax + 0x2c]
test eax, eax
je 0x665f6808
mov dword [esp], edx
mov ebx, 0x200
xor esi, esi
call eax
cmp eax, 0x1f
jle 0x665f671e
cmp eax, 0x10000
mov esi, 0x10000
cmovg eax, esi
mov esi, eax
mov ebx, eax
sar esi, 0x1f
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
add eax, ebx
adc edx, esi
add eax, 0xffffffff
adc edx, 0xffffffff
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.libgcc_s_dw2_1.dll___divdi3
imul edx, ebx
mov ecx, edx
mov edx, esi
mov esi, dword [esp + 0x5c]
imul edx, eax
add ecx, edx
mul ebx
mov ebx, dword [esp + 0x58]
add edx, ecx
cmp ebx, eax
mov ecx, esi
mov dword [esp + 0x80], eax
sbb ecx, edx
mov dword [esp + 0x84], edx
jge 0x665f6814
lea esi, [esp + 0x78]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x40], ebp
mov ebx, esi
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x28], 0
mov esi, dword [esp + 0x58]
jmp 0x665f67bf
add esi, dword [esp + 0x20]
adc edi, dword [esp + 0x24]
mov eax, edi
add dword [esp + 0x28], 1
cmp esi, dword [esp + 0x80]
sbb eax, dword [esp + 0x84]
jge 0x665f67ee
mov eax, dword [esp + 0x50]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 4]
mov dword [esp + 4], esi
mov dword [esp], eax
mov eax, ebx
mov dword [esp + 8], edi
call fcn.66593aa0
test eax, eax
je 0x665f67a0
jmp 0x665f6253
mov eax, dword [edi + 0x44]
mov ecx, eax
jmp 0x665f6069
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x40]
jmp 0x665f5fe4
mov dword [esp + 0x30], 7
jmp 0x665f61f2
mov ebx, 0x1000
xor esi, esi
jmp 0x665f671e
cmp edx, dword [esp + 0x5c]
jne 0x665f5fdc
cmp eax, dword [esp + 0x58]
je 0x665f6442
jmp 0x665f5fdc
mov esi, ecx
jmp 0x665f6640