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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
push ebx
push esi
push edi
mov dword [esp + 0x18], edx
mov edi, ecx
mov dword [esp + 0x34], edi
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x1c], eax
inc eax
mov dword [ebp + 0x10], eax
inc eax
mov dword [esp + 0x48], eax
mov ecx, eax
mov dword [esp + 0x38], ecx
inc ecx
mov dword [esp + 0x2c], ecx
inc ecx
mov eax, dword [edi + 0x2c]
mov esi, dword [edi + 8]
mov ebx, dword [edi]
mov dword [esp + 0x44], ecx
inc ecx
mov dword [esp + 0x54], ecx
inc ecx
mov dword [esp + 0x50], ecx
inc ecx
cmp eax, ecx
mov dword [esp + 0x4c], ebx
cmovle eax, ecx
mov byte [esp + 0x13], 1
mov dword [esp + 0x20], ecx
mov dword [edi + 0x2c], eax
test esi, esi
jne 0x4963c6
cmp dword [edi + 0x78], esi
jne 0x4963b1
test byte [ebx + 0x44], 8
jne 0x4963b1
mov byte [edi + 0x17], 1
mov ecx, edi
call fcn.00478320
mov edx, dword [esp + 0x18]
mov esi, eax
test esi, esi
je 0x496a7a
test edx, edx
je 0x496a7a
cmp dword [edx + 0x1c], 0
je 0x496a7a
mov edx, dword [edx]
mov ecx, str.sqlite__
push 0x5c
push 0x576d90
call fcn.004a1d50
add esp, 8
test eax, eax
je 0x496a7a
mov edx, dword [esp + 0x18]
mov ecx, ebx
mov edx, dword [edx + 0x48]
call fcn.004af190
mov ecx, dword [ebx + 0x10]
mov edx, eax
mov ebx, dword [esp + 0x18]
add edx, edx
mov dword [esp + 0x30], eax
push dword [ecx + edx*8]
mov edx, 0x1c
mov ecx, edi
push 0
push dword [ebx]
call fcn.00497ef0
add esp, 0xc
test eax, eax
jne 0x496a7a
push dword [ebx]
mov edx, dword [esp + 0x34]
mov ecx, edi
push eax
push dword [ebx + 0x1c]
call fcn.00497f90
mov eax, dword [ebp + 0x14]
add esp, 0xc
mov edx, eax
inc eax
mov dword [ebp + 0x14], eax
mov dword [esp + 0x5c], edx
push 0x6a
lea ecx, [eax + 1]
mov eax, dword [edi + 0x28]
cmp eax, ecx
push ebx
push dword [esp + 0x38]
cmovle eax, ecx
mov ecx, edi
mov dword [edi + 0x28], eax
call fcn.004a6be0
mov edx, dword [esp + 0x50]
add esp, 0xc
mov ecx, esi
push dword [ebx]
call fcn.00478760
mov edi, dword [ebx + 8]
add esp, 4
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], edi
test edi, edi
je 0x4969c3
test eax, eax
je 0x49649f
cmp eax, edi
jne 0x4969b4
movzx eax, byte [esp + 0x13]
xor ecx, ecx
cmp dword [edi + 0x24], ecx
cmovne ecx, eax
test byte [ebx + 0x24], 0x20
mov byte [esp + 0x13], cl
je 0x4964c9
mov eax, dword [edi + 0x38]
and al, 3
cmp al, 2
jne 0x4964c9
movzx edi, word [edi + 0x32]
mov eax, ebx
mov ecx, edi
jmp 0x4964df
mov edx, dword [esp + 0x14]
mov eax, edx
movzx edi, word [edi + 0x34]
mov ecx, edi
test byte [edx + 0x38], 8
je 0x4964df
movzx ecx, word [edx + 0x32]
mov eax, dword [eax]
lea ebx, [ecx - 1]
push 0
push eax
push 0
push dword [esp + 0x60]
mov edx, 0x61
mov dword [esp + 0x34], ebx
push 0
mov ecx, esi
call fcn.00478930
mov edx, dword [esp + 0x48]
add esp, 0x14
mov ecx, dword [esp + 0x20]
add ecx, ebx
mov eax, dword [edx + 0x2c]
cmp eax, ecx
push dword [esp + 0x30]
cmovle eax, ecx
mov ecx, esi
mov dword [edx + 0x2c], eax
mov edx, 0x6a
mov eax, dword [esp + 0x18]
push dword [eax + 0x2c]
push dword [ebp + 0x14]
call fcn.00478530
mov edx, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [esp + 0x34]
call fcn.00479340
push dword [esp + 0x48]
mov edx, 0x43
mov ecx, esi
push edi
call fcn.00478680
mov eax, dword [ebp + 0x10]
mov edx, 0x43
mov edi, dword [esp + 0x1c]
add eax, 2
push eax
mov ecx, esi
movzx eax, word [edi + 0x32]
push eax
call fcn.00478680
push 0xfffffffffffffff8
push 0x574884
push dword [ebp + 0x10]
mov edx, 0xa4
mov ecx, esi
push dword [esp + 0x64]
push 0
call fcn.00478930
mov eax, dword [esi + 0x88]
add esp, 0x24
test eax, eax
jle 0x4965a7
lea ecx, [eax + eax*4]
mov edx, 2
mov eax, dword [esi + 0x58]
mov word [eax + ecx*4 - 0x12], dx
push dword [ebp + 0x14]
mov edx, 0x25
mov ecx, esi
call fcn.00478610
add esp, 4
mov dword [esp + 0x58], eax
mov edx, 0x43
mov ecx, esi
push dword [esp + 0x38]
push 0
call fcn.00478680
mov eax, dword [esi + 0x88]
add esp, 8
mov dword [esp + 0x40], eax
test ebx, ebx
jle 0x49684e
mov ecx, esi
call fcn.00478ac0
lea ecx, [ebx*4]
mov dword [esp + 0x3c], eax
push 0
push ecx
mov ecx, dword [esp + 0x54]
call fcn.004595f0
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
je 0x4969ad
mov edx, 0xd
mov ecx, esi
call fcn.004785a0
mov eax, dword [esi + 0x88]
mov dword [esp + 0x40], eax
cmp ebx, 1
jne 0x49664d
cmp word [edi + 0x32], bx
jne 0x49664d
cmp byte [edi + 0x36], 0
je 0x49664d
push dword [esp + 0x3c]
lea edx, [ebx + 0x32]
mov ecx, esi
push dword [esp + 0x24]
call fcn.00478680
add esp, 8
xor ebx, ebx
cmp dword [esp + 0x24], ebx
jle 0x4966e8
nop dword [eax]
mov edx, dword [edi + 0x20]
mov ecx, dword [esp + 0x34]
mov edx, dword [edx + ebx*4]
call fcn.0049a280
push dword [esp + 0x38]
mov edx, 0x43
mov ecx, esi
push ebx
mov edi, eax
call fcn.00478680
push dword [esp + 0x34]
mov edx, 0x63
mov ecx, esi
push ebx
push dword [ebp + 0x14]
call fcn.00478530
mov eax, dword [esp + 0x34]
add esp, 0x14
add eax, ebx
mov edx, 0x34
mov ecx, esi
push 0xfffffffffffffffe
push edi
push eax
push 0
push dword [esp + 0x3c]
call fcn.00478930
mov ecx, dword [esp + 0x3c]
add esp, 0x14
mov dword [ecx + ebx*4], eax
mov eax, dword [esi + 0x88]
test eax, eax
jle 0x4966d9
lea ecx, [eax + eax*4]
mov edx, 0x80
mov eax, dword [esi + 0x58]
mov word [eax + ecx*4 - 0x12], dx
mov edi, dword [esp + 0x14]
inc ebx
cmp ebx, dword [esp + 0x24]
jl 0x496660
push dword [esp + 0x38]
mov ebx, dword [esp + 0x28]
mov edx, 0x43
push ebx
mov ecx, esi
call fcn.00478680
mov edx, dword [esp + 0x44]
add esp, 8
mov ecx, esi
call fcn.004786f0
mov eax, dword [esi]
mov edi, dword [esp + 0x40]
mov edx, dword [esi + 0x88]
cmp byte [eax + 0x49], 0
lea ecx, [edi - 1]
je 0x496727
mov eax, 0x59f374
jmp 0x49673a
test ecx, ecx
mov eax, edx
cmovns eax, edi
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x58]
lea eax, [eax + ecx*4]
add eax, 0xfffffff4
xor edi, edi
mov dword [eax], edx
test ebx, ebx
jle 0x4967e4
nop word [eax + eax]
mov eax, dword [esp + 0x28]
mov edx, dword [esi + 0x88]
mov ecx, dword [eax + edi*4]
mov eax, dword [esi]
cmp byte [eax + 0x49], 0
je 0x49676c
mov eax, 0x59f36c
jmp 0x49677d
test ecx, ecx
lea eax, [edx - 1]
cmovns eax, ecx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x58]
lea eax, [eax + ecx*4]
mov dword [eax + 8], edx
mov eax, dword [esi + 0xc]
mov edx, dword [esp + 0x20]
mov ecx, dword [esi + 0x88]
add edx, edi
cmp dword [eax + 0x30], ecx
jg 0x4967aa
push edx
push edi
push dword [ebp + 0x14]
mov edx, 0x63
mov ecx, esi
call fcn.004784f0
add esp, 0xc
jmp 0x4967db
mov ebx, dword [ebp + 0x14]
lea eax, [ecx + 1]
mov dword [esi + 0x88], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x58]
mov dword [eax + ecx*4 + 4], ebx
mov ebx, dword [esp + 0x24]
mov dword [eax + ecx*4], 0x63
mov dword [eax + ecx*4 + 8], edi
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
inc edi
cmp edi, ebx
jl 0x496750
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x48]
test ecx, ecx
je 0x496803
mov eax, dword [esp + 0x3c]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [esi + 0x88]
mov dword [ecx], eax
mov ebx, dword [esp + 0x4c]
cmp dword [ebx + 0x1d8], 0
je 0x49681d
mov edx, dword [esp + 0x28]
mov ecx, ebx
call fcn.00459240
jmp 0x49684a
mov ecx, dword [esp + 0x28]
cmp ecx, dword [ebx + 0x128]
jb 0x496841
cmp ecx, dword [ebx + 0x12c]
jae 0x496841
mov eax, dword [ebx + 0x124]
mov dword [ecx], eax
mov dword [ebx + 0x124], ecx
jmp 0x49684a
push ecx
call fcn.00459190
add esp, 4
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x2c]
mov edx, 0xa4
push 0xfffffffffffffff8
push 0x5767a0
push ebx
push dword [ebp + 0x10]
mov ecx, esi
push 1
call fcn.00478930
mov eax, dword [esi + 0x88]
add esp, 0x14
test eax, eax
jle 0x496888
lea ecx, [eax + eax*4]
mov edx, 2
mov eax, dword [esi + 0x58]
mov word [eax + ecx*4 - 0x12], dx
push dword [esp + 0x40]
mov edx, 7
mov ecx, esi
push dword [ebp + 0x14]
call fcn.00478680
push 0xfffffffffffffff8
push 0x57485c
push dword [esp + 0x60]
mov edx, 0xa4
mov ecx, esi
push dword [ebp + 0x10]
push 0
call fcn.00478930
mov eax, dword [esi + 0x88]
add esp, 0x1c
test eax, eax
jle 0x4968d4
lea ecx, [eax + eax*4]
mov edx, 1
mov eax, dword [esi + 0x58]
mov word [eax + ecx*4 - 0x12], dx
push 0
push 0x598e30
push ebx
push 3
push dword [esp + 0x54]
mov edx, 0x65
mov ecx, esi
call fcn.00478930
add esp, 0x14
mov edx, 0x75
mov ecx, esi
push dword [esp + 0x1c]
push dword [ebp + 0xc]
call fcn.00478680
mov eax, dword [esi + 0xc]
add esp, 8
mov ecx, dword [esi + 0x88]
cmp dword [eax + 0x30], ecx
jg 0x49692e
push dword [esp + 0x1c]
mov edx, 0x76
mov ecx, esi
push ebx
push dword [ebp + 0xc]
call fcn.004784f0
add esp, 0xc
jmp 0x49695f
mov edx, dword [ebp + 0xc]
lea eax, [ecx + 1]
mov dword [esi + 0x88], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x58]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x1c]
mov dword [eax + ecx*4], 0x76
mov dword [eax + ecx*4 + 8], ebx
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
mov edx, dword [esi + 0x88]
test edx, edx
jle 0x49697f
mov eax, dword [esi + 0x58]
lea ecx, [edx + edx*4]
mov edx, 8
mov word [eax + ecx*4 - 0x12], dx
mov edx, dword [esi + 0x88]
mov ecx, dword [esp + 0x58]
test ecx, ecx
jns 0x49698a
lea ecx, [edx - 1]
mov eax, dword [esi]
cmp byte [eax + 0x49], 0
je 0x496999
mov eax, 0x59f36c
jmp 0x4969a2
mov eax, dword [esi + 0x58]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov dword [eax + 8], edx
mov al, byte [esp + 0x13]
mov byte [esp + 0x13], al
mov eax, dword [ebp + 8]
mov ebx, dword [esp + 0x18]
mov edi, dword [edi + 0x14]
mov dword [esp + 0x14], edi
test edi, edi
jne 0x496493
test eax, eax
jne 0x496a7a
cmp byte [esp + 0x13], al
je 0x496a7a
mov ebx, dword [esp + 0x50]
lea edx, [eax + 0x66]
push ebx
push dword [esp + 0x60]
mov ecx, esi
call fcn.00478680
push ebx
mov edx, 0x16
mov ecx, esi
call fcn.00478610
add esp, 0xc
mov edx, 0x46
mov ecx, esi
mov edi, eax
push dword [esp + 0x54]
push 0
call fcn.00478680
mov ebx, dword [esp + 0x34]
mov edx, 0x65
push 0
push 0x598e2c
push ebx
push 3
push dword [esp + 0x5c]
mov ecx, esi
call fcn.00478930
add esp, 0x1c
mov edx, 0x75
mov ecx, esi
push dword [esp + 0x1c]
push dword [ebp + 0xc]
call fcn.00478680
push dword [esp + 0x24]
mov edx, 0x76
mov ecx, esi
push ebx
push dword [ebp + 0xc]
call fcn.00478530
mov eax, dword [esi + 0x88]
add esp, 0x14
test eax, eax
jle 0x496a71
lea ecx, [eax + eax*4]
mov edx, 8
mov eax, dword [esi + 0x58]
mov word [eax + ecx*4 - 0x12], dx
mov edx, edi
mov ecx, esi
call fcn.00478e60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret