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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4af05a
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x4c3790]
xor eax, esp
mov dword [esp + 0x118], eax
push ebx
push esi
push edi
mov eax, dword [0x4c3790]
xor eax, esp
push eax
lea eax, [esp + 0x130]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], eax
add edi, 0x1c
push 0x4b7574
mov ebx, 1
mov eax, edi
mov dword [esp + 0x20], ecx
call fcn.00412e30
lea ebx, [eax + 1]
neg ebx
sbb ebx, ebx
and ebx, eax
push ebx
xor ecx, ecx
lea esi, [esp + 0x110]
mov edx, edi
call fcn.00411d30
mov dword [esp + 0x138], 0
test ebx, ebx
je 0x40d4af
inc ebx
push 0xffffffffffffffff
mov ecx, ebx
lea esi, [esp + 0x4c]
mov edx, edi
call fcn.00411d30
push 0x4b7578
mov ebx, 1
mov eax, esi
mov byte [esp + 0x13c], 1
call fcn.00412e30
lea ebx, [eax + 1]
neg ebx
sbb ebx, ebx
and ebx, eax
push ebx
xor ecx, ecx
lea esi, [esp + 0x68]
lea edx, [esp + 0x4c]
call fcn.00411d30
mov byte [esp + 0x138], 2
test ebx, ebx
je 0x40d4fd
inc ebx
push 0xffffffffffffffff
mov ecx, ebx
lea esi, [esp + 0x84]
lea edx, [esp + 0x4c]
call fcn.00411d30
cmp dword [esp + 0x1c], 0
mov byte [esp + 0x138], 3
mov dword [esp + 0x14], 0
jne 0x40d66f
mov esi, 0x10
cmp dword [edi + 0x14], esi
jb 0x40d53a
mov eax, dword [edi]
jmp 0x40d53c
mov eax, edi
push 0
push 1
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.00492780
add esp, 0x10
test eax, eax
je 0x40d679
cmp dword [edi + 0x14], esi
jb 0x40d55d
mov edi, dword [edi]
push edi
push ecx
push str.Failed_to_create_db
push 0x4c6060
call fcn.00405100
add esp, 0xc
push eax
call fcn.00405100
add esp, 8
mov edi, eax
push 0xa
mov ecx, edi
call fcn.004031f0
mov eax, dword [edi]
mov eax, dword [eax + 4]
xor ebx, ebx
test byte [eax + edi + 0xc], 6
jne 0x40d5a8
mov eax, dword [eax + edi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40d5a8
lea ebx, [eax + 5]
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
xor esi, esi
add ecx, edi
cmp ebx, esi
je 0x40d5c9
mov eax, dword [ecx + 0xc]
or eax, ebx
cmp dword [ecx + 0x38], esi
jne 0x40d5c2
or eax, 4
push esi
push eax
call fcn.00401b30
mov eax, dword [esp + 0x14]
push esi
call fcn.004909a0
mov ebx, 0x10
add esp, 4
cmp dword [esp + 0x94], ebx
jb 0x40d5f4
mov edx, dword [esp + 0x80]
push edx
call fcn.004961b3
add esp, 4
mov edi, 0xf
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], esi
mov byte [esp + 0x80], 0
cmp dword [esp + 0x78], ebx
jb 0x40d622
mov eax, dword [esp + 0x64]
push eax
call fcn.004961b3
add esp, 4
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], esi
mov byte [esp + 0x64], 0
cmp dword [esp + 0x5c], ebx
jb 0x40d642
mov ecx, dword [esp + 0x48]
push ecx
call fcn.004961b3
add esp, 4
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], esi
mov byte [esp + 0x48], 0
cmp dword [esp + 0x120], ebx
jb 0x40d668
mov edx, dword [esp + 0x10c]
push edx
call fcn.004961b3
add esp, 4
xor al, al
jmp 0x40de92
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x14], edi
jmp 0x40d67d
mov edi, dword [esp + 0x14]
push 0x16
mov esi, 0xf
push str.SELECT_KEY_VALUE_FROM
lea ecx, [esp + 0xf8]
mov dword [esp + 0x10c], esi
mov dword [esp + 0x108], 0
mov byte [esp + 0xf8], 0
call fcn.00403f20
lea eax, [esp + 0x64]
lea ecx, [esp + 0xf0]
lea ebx, [esp + 0xb8]
mov byte [esp + 0x138], 4
call fcn.004139f0
mov byte [esp + 0x138], 6
cmp dword [esp + 0x104], 0x10
jb 0x40d6f0
mov eax, dword [esp + 0xf0]
push eax
call fcn.004961b3
add esp, 4
mov eax, dword [esp + 0xb8]
xor ebx, ebx
cmp dword [esp + 0xcc], 0x10
mov dword [esp + 0x104], esi
mov dword [esp + 0x100], ebx
mov byte [esp + 0xf0], bl
jae 0x40d71f
lea eax, [esp + 0xb8]
mov ecx, dword [esp + 0xc8]
push ebx
push ebx
push 1
push ecx
push eax
lea esi, [esp + 0x2c]
mov eax, edi
call fcn.00470890
add esp, 0x14
cmp eax, ebx
je 0x40d81b
cmp dword [esp + 0x1c], ebx
jne 0x40d753
push ebx
mov eax, edi
call fcn.004909a0
add esp, 4
mov esi, 0x10
cmp dword [esp + 0xcc], esi
jb 0x40d771
mov edx, dword [esp + 0xb8]
push edx
call fcn.004961b3
add esp, 4
mov edi, 0xf
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
cmp dword [esp + 0x94], esi
jb 0x40d7a4
mov eax, dword [esp + 0x80]
push eax
call fcn.004961b3
add esp, 4
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
cmp dword [esp + 0x78], esi
jb 0x40d7cc
mov ecx, dword [esp + 0x64]
push ecx
call fcn.004961b3
add esp, 4
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], ebx
mov byte [esp + 0x64], bl
cmp dword [esp + 0x5c], esi
jb 0x40d7eb
mov edx, dword [esp + 0x48]
push edx
call fcn.004961b3
add esp, 4
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
cmp dword [esp + 0x120], esi
jb 0x40d668
mov eax, dword [esp + 0x10c]
push eax
call fcn.004961b3
add esp, 4
xor al, al
jmp 0x40de92
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00441ee0
add esp, 4
cmp eax, 0x64
jne 0x40dcd0
mov edx, dword [esp + 0x18]
push ebx
push edx
call fcn.00442810
mov esi, eax
mov ecx, esi
add esp, 8
mov dword [esp + 0xb0], 0xf
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
cmp al, bl
jne 0x40d860
sub ecx, edi
push ecx
push esi
lea ecx, [esp + 0xa4]
call fcn.00403f20
mov byte [esp + 0x138], 7
mov eax, dword [esp + 0x18]
push 1
push eax
call fcn.00442810
mov esi, eax
mov ecx, esi
add esp, 8
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
cmp al, bl
jne 0x40d8a5
sub ecx, edi
push ecx
push esi
lea ecx, [esp + 0x34]
call fcn.00403f20
mov byte [esp + 0x138], 8
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0x9c]
mov edi, 0x10
mov eax, edx
cmp ecx, edi
jae 0x40d8e1
lea eax, [esp + 0x9c]
add eax, dword [esp + 0xac]
cmp ecx, edi
mov ecx, edx
jae 0x40d8f5
lea ecx, [esp + 0x9c]
xor edx, edx
mov word [esp + 0xd4], dx
mov edx, dword [esp + 0x28]
push edx
push eax
push ecx
lea eax, [esp + 0xe0]
push eax
mov dword [esp + 0xf8], 7
mov dword [esp + 0xf4], ebx
call fcn.00405d00
lea ebx, [esp + 0xd4]
mov byte [esp + 0x138], 9
call fcn.00401ef0
mov esi, 8
mov ebx, eax
mov byte [esp + 0x138], 8
mov dword [esp + 0x20], ebx
cmp dword [esp + 0xe8], esi
jb 0x40d965
mov ecx, dword [esp + 0xd4]
push ecx
call fcn.004961b3
add esp, 4
test ebx, ebx
jne 0x40da49
mov eax, dword [esp + 0x9c]
cmp dword [esp + 0xb0], edi
jae 0x40d984
lea eax, [esp + 0x9c]
push eax
push ecx
push str.Bad_filter_name:
push 0x4c6060
call fcn.00405100
add esp, 0xc
push eax
call fcn.00405100
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004031f0
mov edx, dword [esi]
mov eax, dword [edx + 4]
xor ebx, ebx
test byte [eax + esi + 0xc], 6
jne 0x40d9d1
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40d9d1
mov ebx, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test ebx, ebx
je 0x40d9f2
mov eax, dword [ecx + 0xc]
or eax, ebx
cmp dword [ecx + 0x38], 0
jne 0x40d9ea
or eax, 4
push 0
push eax
call fcn.00401b30
mov edx, dword [esp + 0x18]
push edx
call fcn.00441ee0
add esp, 4
cmp dword [esp + 0x40], edi
jb 0x40da12
mov eax, dword [esp + 0x2c]
push eax
call fcn.004961b3
add esp, 4
mov byte [esp + 0x138], 6
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
cmp dword [esp + 0xb0], edi
jb 0x40dcb8
mov ecx, dword [esp + 0x9c]
push ecx
jmp 0x40dcb0
mov edx, dword [esp + 0x14]
mov byte [ebx + 4], 1
mov dword [ebx + 8], edx
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x2c]
mov eax, ecx
cmp edx, edi
jae 0x40da66
lea eax, [esp + 0x2c]
add eax, dword [esp + 0x3c]
cmp edx, 0x10
jae 0x40da73
lea ecx, [esp + 0x2c]
xor edx, edx
mov word [esp + 0xd4], dx
mov edx, dword [esp + 0x28]
push edx
push eax
push ecx
lea eax, [esp + 0xe0]
push eax
mov dword [esp + 0xf8], 7
mov dword [esp + 0xf4], 0
call fcn.00405d00
mov byte [esp + 0x138], 0xa
mov edx, dword [ebx]
mov edx, dword [edx + 4]
lea eax, [esp + 0xd4]
push eax
mov ecx, ebx
call edx
test al, al
sete byte [esp + 0x13]
mov byte [esp + 0x138], 8
cmp dword [esp + 0xe8], esi
jb 0x40dae8
mov eax, dword [esp + 0xd4]
push eax
call fcn.004961b3
add esp, 4
cmp byte [esp + 0x13], 0
je 0x40db85
cmp dword [esp + 0xb0], 0x10
mov eax, dword [esp + 0x9c]
jae 0x40db0b
lea eax, [esp + 0x9c]
push eax
push ecx
push str.Bad_arguments_format:
push 0x4c6060
call fcn.00405100
add esp, 0xc
push eax
call fcn.00405100
add esp, 8
mov esi, eax
push 0xa
mov ecx, esi
call fcn.004031f0
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40db58
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40db58
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40db77
or edi, dword [ecx + 0xc]
cmp dword [ecx + 0x38], 0
jne 0x40db6f
or edi, 4
push 0
push edi
call fcn.00401b30
push ebx
call fcn.004961b3
add esp, 4
jmp 0x40dc6a
mov edx, dword [ebx]
mov edx, dword [edx + 8]
lea eax, [esp + 0xd4]
push eax
mov ecx, ebx
call edx
cmp dword [eax + 0x10], 0
setne byte [esp + 0x13]
cmp dword [esp + 0xe8], esi
jb 0x40dbb8
mov eax, dword [esp + 0xd4]
push eax
call fcn.004961b3
add esp, 4
cmp byte [esp + 0x13], 0
je 0x40dc05
mov edx, dword [ebx]
mov edx, dword [edx + 8]
lea eax, [esp + 0xd4]
push eax
mov ecx, ebx
call edx
mov byte [esp + 0x138], 0xb
mov esi, dword [esp + 0x28]
mov edi, eax
call fcn.00413200
mov byte [esp + 0x138], 8
cmp dword [esp + 0xe8], 8
jb 0x40dc05
mov eax, dword [esp + 0xd4]
push eax
call fcn.004961b3
add esp, 4
mov edx, dword [ebx]
mov esi, dword [esp + 0x24]
mov eax, dword [edx + 0xc]
push esi
mov ecx, ebx
call eax
test al, al
jne 0x40dc6a
mov eax, dword [esi + 4]
lea ecx, [esp + 0x20]
cmp ecx, eax
jae 0x40dc51
mov ecx, dword [esi]
lea edx, [esp + 0x20]
cmp ecx, edx
ja 0x40dc51
mov edi, edx
sub edi, ecx
sar edi, 2
cmp eax, dword [esi + 8]
jne 0x40dc3f
mov eax, esi
call fcn.00403dc0
mov eax, dword [esi]
lea ecx, [eax + edi*4]
mov eax, dword [esi + 4]
test eax, eax
je 0x40dc66
mov ecx, dword [ecx]
mov dword [eax], ecx
jmp 0x40dc66
cmp eax, dword [esi + 8]
jne 0x40dc5d
mov eax, esi
call fcn.00403dc0
mov eax, dword [esi + 4]
test eax, eax
je 0x40dc66
mov dword [eax], ebx
add dword [esi + 4], 4
mov esi, 0x10
cmp dword [esp + 0x40], esi
jb 0x40dc82
mov edx, dword [esp + 0x2c]
push edx
call fcn.004961b3
add esp, 4
mov byte [esp + 0x138], 6
mov byte [esp + 0x2c], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0xf
cmp dword [esp + 0xb0], esi
jb 0x40dcb8
mov eax, dword [esp + 0x9c]
push eax
call fcn.004961b3
add esp, 4
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00441ee0
add esp, 4
xor ebx, ebx
cmp eax, 0x64
je 0x40d831
mov edx, dword [esp + 0x18]
push edx
call fcn.004412c0
add esp, 4
test eax, eax
je 0x40ddc0
cmp dword [esp + 0x1c], ebx
jne 0x40dcf8
mov eax, dword [esp + 0x14]
push ebx
call fcn.004909a0
add esp, 4
mov esi, 0x10
cmp dword [esp + 0xcc], esi
jb 0x40dd16
mov eax, dword [esp + 0xb8]
push eax
call fcn.004961b3
add esp, 4
mov edi, 0xf
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
cmp dword [esp + 0x94], esi
jb 0x40dd49
mov ecx, dword [esp + 0x80]
push ecx
call fcn.004961b3
add esp, 4
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
cmp dword [esp + 0x78], esi
jb 0x40dd71
mov edx, dword [esp + 0x64]
push edx
call fcn.004961b3
add esp, 4
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], ebx
mov byte [esp + 0x64], bl
cmp dword [esp + 0x5c], esi
jb 0x40dd90
mov eax, dword [esp + 0x48]
push eax
call fcn.004961b3
add esp, 4
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
cmp dword [esp + 0x120], esi
jb 0x40d668
mov ecx, dword [esp + 0x10c]
push ecx
call fcn.004961b3
add esp, 4
xor al, al
jmp 0x40de92
cmp dword [esp + 0x1c], ebx
jne 0x40ddd3
mov eax, dword [esp + 0x14]
push ebx
call fcn.004909a0
add esp, 4
mov esi, 0x10
cmp dword [esp + 0xcc], esi
jb 0x40ddf1
mov edx, dword [esp + 0xb8]
push edx
call fcn.004961b3
add esp, 4
mov edi, 0xf
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
cmp dword [esp + 0x94], esi
jb 0x40de24
mov eax, dword [esp + 0x80]
push eax
call fcn.004961b3
add esp, 4
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
cmp dword [esp + 0x78], esi
jb 0x40de4c
mov ecx, dword [esp + 0x64]
push ecx
call fcn.004961b3
add esp, 4
mov dword [esp + 0x78], edi
mov dword [esp + 0x74], ebx
mov byte [esp + 0x64], bl
cmp dword [esp + 0x5c], esi
jb 0x40de6b
mov edx, dword [esp + 0x48]
push edx
call fcn.004961b3
add esp, 4
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
cmp dword [esp + 0x120], esi
jb 0x40de90
mov eax, dword [esp + 0x10c]
push eax
call fcn.004961b3
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x130]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00495b13
mov esp, ebp
pop ebp
ret 4