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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
push ebx
push esi
push edi
mov edi, ecx
xor edx, edx
mov dword [esp + 0x3c], edi
call fcn.004fb9d0
test eax, eax
jne 0x502387
push dword [edi + 0xe0]
xor ebx, ebx
mov dword [esp + 0x24], eax
push str.SELECT__s
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x48], ebx
call fcn.0043e130
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x5019d3
mov esi, 7
mov dword [esp + 0x14], esi
jmp 0x501aa6
push 0
lea ecx, [esp + 0x28]
mov edx, eax
push ecx
mov ecx, dword [edi + 0xc]
push 0
push 0x80
push 0xffffffffffffffff
call fcn.004adf50
mov esi, eax
add esp, 0x14
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
cmp dword [0x5dac30], ebx
je 0x501a4b
mov eax, dword [0x5dfe08]
test eax, eax
je 0x501a15
push eax
call dword [0x5dac80]
add esp, 4
mov ebx, dword [esp + 0x18]
push ebx
call dword [0x5dac5c]
sub dword [0x5dfca8], eax
add esp, 4
dec dword [0x5dfccc]
push ebx
call dword [0x5dac54]
mov eax, dword [0x5dfe08]
add esp, 4
test eax, eax
je 0x501a59
push eax
call dword [0x5dac88]
jmp 0x501a56
mov ebx, dword [esp + 0x18]
push ebx
call dword [0x5dac54]
add esp, 4
test esi, esi
jne 0x501aa2
mov eax, dword [edi + 0x18]
mov ecx, 0xc
imul ecx
mov ebx, eax
add ebx, ecx
adc edx, esi
mov dword [esp + 0x28], edx
call fcn.004e4f50
test eax, eax
je 0x501a80
mov dword [esp + 0x20], esi
jmp 0x501a99
push dword [esp + 0x28]
push ebx
call fcn.0043b050
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
jne 0x501b33
mov esi, 7
mov dword [esp + 0x14], esi
mov ebx, dword [esp + 0x24]
cmp byte [edi + 0xec], 0
je 0x501ace
push dword [esp + 0x40]
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x18]
push dword [esp + 0x3c]
push edx
mov edx, edi
call fcn.00500e70
mov esi, dword [esp + 0x20]
add esp, 0xc
mov edi, dword [esp + 0x20]
test edi, edi
je 0x5022d3
cmp dword [0x5dac30], 0
je 0x5022c9
mov eax, dword [0x5dfe08]
test eax, eax
je 0x501afa
push eax
call dword [0x5dac80]
add esp, 4
push edi
call dword [0x5dac5c]
sub dword [0x5dfca8], eax
add esp, 4
dec dword [0x5dfccc]
push edi
call dword [0x5dac54]
mov eax, dword [0x5dfe08]
add esp, 4
test eax, eax
je 0x5022d3
push eax
call dword [0x5dac88]
jmp 0x5022d0
push ebx
push 0
push eax
call fcn.00570cd0
mov ecx, dword [edi + 0x18]
add esp, 0xc
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
shl ecx, 2
add eax, ecx
lea edx, [eax + 4]
add eax, 8
add eax, ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x38], eax
nop
mov dword [esp + 0x18], 0
test ebx, ebx
je 0x502297
cmp dword [ebx], 0
jne 0x501b8b
push str.API_called_with_finalized_prepared_statement
push 0x15
call fcn.0043e300
add esp, 8
mov eax, 1
jmp 0x501b8d
xor eax, eax
test eax, eax
jne 0x5022a6
mov eax, dword [ebx]
mov dword [esp + 0x10], eax
mov eax, dword [eax + 0xc]
test eax, eax
je 0x501bac
push eax
call dword [0x5dac80]
add esp, 4
mov ecx, ebx
call fcn.00466700
mov esi, eax
cmp esi, 0x11
jne 0x501d00
nop
mov eax, dword [esp + 0x18]
mov ecx, eax
inc eax
mov dword [esp + 0x18], eax
cmp ecx, 0x32
jge 0x501cfc
mov eax, dword [ebx + 0x20]
lea ecx, [esp + 0x34]
mov esi, dword [ebx]
mov edx, dword [ebx + 0xc8]
push 0
push ecx
mov dword [esp + 0x30], eax
mov ecx, esi
movzx eax, byte [ebx + 0x94]
push ebx
push eax
push 0xffffffffffffffff
call fcn.004adf50
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x501d91
mov esi, dword [esp + 0x34]
lea edi, [esp + 0x48]
mov ecx, 0x3a
mov edx, ebx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x34]
mov ecx, 0x3a
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x3a
lea esi, [esp + 0x48]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x34]
mov eax, dword [ebx + 8]
mov ecx, dword [esi + 8]
mov dword [esi + 8], eax
mov eax, dword [ebx + 4]
mov dword [ebx + 8], ecx
mov ecx, dword [esi + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 0xc8]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 0xc8]
mov dword [esi + 0xc8], eax
mov dword [ebx + 0xc8], ecx
mov ecx, esi
mov eax, dword [esi + 0xdc]
mov dword [ebx + 0xdc], eax
mov al, byte [esi + 0x94]
mov byte [ebx + 0x94], al
movups xmm0, xmmword [esi + 0xa4]
movups xmmword [ebx + 0xa4], xmm0
movups xmm0, xmmword [esi + 0xb4]
movups xmmword [ebx + 0xb4], xmm0
mov eax, dword [esi + 0xc4]
mov dword [ebx + 0xc4], eax
inc dword [ebx + 0xb8]
call fcn.00468840
mov dword [esi + 0x24], 0
cmp byte [esi + 0x95], 1
jb 0x501ccc
mov ecx, esi
call fcn.00463720
mov ecx, esi
call fcn.00463800
push ebx
call fcn.00465900
add esp, 4
cmp dword [esp + 0x28], 0
jl 0x501cea
mov byte [ebx + 0x93], 0xfe
mov ecx, ebx
call fcn.00466700
mov esi, eax
cmp esi, 0x11
je 0x501bc0
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x501d15
push eax
call dword [0x5dac88]
add esp, 4
cmp esi, 0x64
jne 0x50228e
cmp dword [edi + 0x2c], 0
mov dword [esp + 0x24], 0
je 0x501d3e
mov eax, dword [edi + 0x18]
inc eax
push eax
push ebx
call fcn.004674e0
add esp, 8
mov dword [esp + 0x24], eax
mov ecx, dword [ebx]
mov ecx, dword [ecx + 0xc]
test ecx, ecx
je 0x501d51
push ecx
call dword [0x5dac80]
add esp, 4
mov ecx, dword [ebx + 0x78]
test ecx, ecx
je 0x501d63
xor eax, eax
cmp ax, word [ebx + 0x90]
jb 0x501d7b
mov ecx, dword [ebx]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.0043ee60
mov ecx, 0x5b3788
movzx eax, word [ecx + 0x10]
test al, 0x24
je 0x501e79
mov esi, dword [ecx]
mov eax, dword [ecx + 4]
jmp 0x501eba
cmp edi, 7
jne 0x501d9d
mov ecx, esi
call fcn.0043ba90
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x124]
test ecx, ecx
jne 0x501daf
xor esi, esi
jmp 0x501de2
movzx edx, word [ecx + 0x10]
mov eax, edx
and eax, 0x202
cmp eax, 0x202
jne 0x501dcc
cmp byte [ecx + 0x12], 1
jne 0x501dcc
mov esi, dword [ecx + 8]
jmp 0x501dde
test dl, 1
je 0x501dd5
xor esi, esi
jmp 0x501dde
mov dl, 1
call fcn.00460000
mov esi, eax
mov eax, dword [esp + 0x10]
mov edx, dword [ebx + 0x7c]
test edx, edx
je 0x501df0
mov ecx, eax
call fcn.0043b330
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x57], 0
jne 0x501e61
test esi, esi
jne 0x501e02
xor eax, eax
jmp 0x501e49
mov ecx, esi
lea eax, [ecx + 1]
mov dword [esp + 0x28], eax
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x501e10
sub ecx, dword [esp + 0x28]
push 0
lea eax, [ecx + 1]
mov ecx, edx
push eax
mov dword [esp + 0x30], eax
call fcn.0043b7c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x501e49
push dword [esp + 0x28]
push esi
push eax
call fcn.00570750
mov eax, dword [esp + 0x24]
add esp, 0xc
mov ecx, dword [esp + 0x10]
mov edx, edi
mov dword [ebx + 0x7c], eax
call fcn.0043bb70
mov esi, eax
mov dword [ebx + 0x24], esi
jmp 0x501cfc
mov edi, dword [esp + 0x3c]
mov esi, 7
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x24], esi
jmp 0x501d04
test al, 8
je 0x501e8e
movsd xmm0, qword [ecx]
call fcn.0045f320
mov esi, eax
mov dword [esp + 0x14], edx
jmp 0x501ebe
test al, 0x12
je 0x501ea9
cmp dword [ecx + 8], 0
je 0x501ea9
call fcn.0045f350
mov esi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jmp 0x501ec2
xorps xmm0, xmm0
movlpd qword [esp + 0x28], xmm0
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x24]
cmp byte [ecx + 0x57], 0
jne 0x501ed5
test edx, edx
jne 0x501ed5
xor eax, eax
jmp 0x501eda
call fcn.0043bb70
mov dword [ebx + 0x24], eax
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x501ef0
push eax
call dword [0x5dac88]
add esp, 4
mov edx, dword [edi + 0x114]
mov eax, dword [esp + 0x14]
mov ecx, dword [edi + 0x110]
cmp eax, edx
jl 0x501f35
jg 0x501f0a
cmp esi, ecx
jb 0x501f35
cmp esi, ecx
jne 0x501f1b
cmp eax, edx
jne 0x501f1b
cmp dword [edi + 0x11c], 0
je 0x501f35
mov eax, dword [esp + 0x24]
cmp dword [edi + 0x118], eax
jne 0x501f35
mov eax, dword [edi + 0x10c]
cmp eax, dword [edi + 0x108]
jle 0x501f4a
mov ecx, edi
call fcn.00500700
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x501f74
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [edi + 0x110], esi
xor esi, esi
mov dword [edi + 0x114], eax
mov eax, dword [esp + 0x24]
mov dword [edi + 0x118], eax
mov dword [edi + 0x11c], 0
mov dword [esp + 0x1c], esi
mov eax, dword [edi + 0x18]
mov dword [esp + 0x14], esi
lea eax, [eax*4 + 4]
push eax
push 0
push dword [esp + 0x28]
call fcn.00570cd0
add esp, 0xc
test esi, esi
jne 0x50218b
mov eax, dword [esp + 0x20]
mov esi, 1
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x28], esi
mov dword [esp + 0x10], 0x28
mov dword [esp + 0x18], eax
nop word [eax + eax]
lea edx, [esi - 1]
cmp edx, dword [edi + 0x18]
jge 0x502187
mov eax, dword [edi + 0x20]
cmp byte [edx + eax], 0
jne 0x502170
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x501fec
push eax
call dword [0x5dac80]
add esp, 4
mov ecx, dword [ebx + 0x78]
test ecx, ecx
je 0x50200e
movzx eax, word [ebx + 0x90]
cmp esi, eax
jge 0x50200e
test esi, esi
js 0x50200e
add ecx, dword [esp + 0x10]
jne 0x502026
mov dword [esp + 0x14], ecx
jmp 0x50205d
mov ecx, dword [ebx]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.0043ee60
mov ecx, 0x5b3788
movzx edx, word [ecx + 0x10]
mov eax, edx
and eax, 0x202
cmp eax, 0x202
jne 0x502043
cmp byte [ecx + 0x12], 1
jne 0x502043
mov eax, dword [ecx + 8]
jmp 0x502059
test dl, 1
je 0x502052
mov dword [esp + 0x14], 0
jmp 0x50205d
mov dl, 1
call fcn.00460000
mov dword [esp + 0x14], eax
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x24]
cmp byte [ecx + 0x57], 0
jne 0x502070
test edx, edx
jne 0x502070
xor eax, eax
jmp 0x502075
call fcn.0043bb70
mov dword [ebx + 0x24], eax
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x50208b
push eax
call dword [0x5dac88]
add esp, 4
push dword [esp + 0x18]
mov edx, dword [esp + 0x28]
lea eax, [esi - 1]
push eax
push dword [esp + 0x1c]
mov ecx, edi
call fcn.004fb5a0
mov dword [esp + 0x28], eax
add esp, 0xc
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x5020c0
push eax
call dword [0x5dac80]
add esp, 4
mov ecx, dword [ebx + 0x78]
test ecx, ecx
je 0x5020dc
movzx eax, word [ebx + 0x90]
cmp esi, eax
jge 0x5020dc
test esi, esi
js 0x5020dc
add ecx, dword [esp + 0x10]
jmp 0x5020f4
mov ecx, dword [ebx]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.0043ee60
mov ecx, 0x5b3788
movzx eax, word [ecx + 0x10]
test al, 2
je 0x502107
cmp byte [ecx + 0x12], 1
jne 0x502107
mov esi, dword [ecx + 0xc]
jmp 0x502130
test al, 0x10
je 0x50211f
mov edx, dword [ecx + 0xc]
test eax, 0x400
je 0x50211b
mov esi, dword [ecx]
add esi, edx
jmp 0x502130
mov esi, edx
jmp 0x502130
test al, 1
je 0x502127
xor esi, esi
jmp 0x502130
mov dl, 1
call fcn.004606b0
mov esi, eax
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x24]
cmp byte [ecx + 0x57], 0
jne 0x502143
test edx, edx
jne 0x502143
xor eax, eax
jmp 0x502148
call fcn.0043bb70
mov dword [ebx + 0x24], eax
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x50215e
push eax
call dword [0x5dac88]
add esp, 4
mov ecx, dword [esp + 0x20]
mov eax, dword [edi + 0x18]
add dword [ecx + eax*4], esi
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
add dword [esp + 0x18], 4
inc esi
add dword [esp + 0x10], 0x28
mov dword [esp + 0x28], esi
test ecx, ecx
je 0x501fc0
mov esi, dword [esp + 0x1c]
cmp byte [edi + 0xee], 0
je 0x5021ae
push dword [esp + 0x20]
mov edx, edi
lea ecx, [esp + 0x18]
call fcn.00500c80
mov esi, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x5021e8
inc dword [esp + 0x40]
xor edx, edx
cmp dword [edi + 0x18], edx
jl 0x501b60
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
sub esi, ecx
nop dword [eax + eax]
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
add dword [ecx - 4], eax
inc edx
cmp edx, dword [edi + 0x18]
jle 0x5021d0
mov esi, dword [esp + 0x1c]
jmp 0x501b60
mov eax, dword [ebx]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x502223
push str.API_called_with_finalized_prepared_statement
push 0x15
call fcn.0043e300
push 0x5cacbc
push 0x15592
push str.misuse
push str._s_at_line__d_of___.10s_
push 0x15
call fcn.0043e300
add esp, 0x1c
xor ebx, ebx
jmp 0x501aa6
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x502238
push ecx
call dword [0x5dac80]
mov eax, dword [esp + 0x2c]
add esp, 4
cmp dword [ebx + 0x8c], 0
jl 0x502255
jg 0x50224c
cmp dword [ebx + 0x88], 0
jbe 0x502255
mov edx, ebx
mov ecx, eax
call fcn.00465760
mov ecx, ebx
call fcn.00463720
mov ecx, ebx
mov dword [esp + 0x34], eax
call fcn.00463800
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
cmp byte [ebx + 0x57], 0
jne 0x502279
test edx, edx
je 0x502280
mov ecx, ebx
call fcn.0043bb70
mov ecx, ebx
call fcn.004e6290
xor ebx, ebx
jmp 0x501aa6
mov esi, dword [esp + 0x1c]
jmp 0x501aa6
push str.API_called_with_NULL_prepared_statement
push 0x15
call fcn.0043e300
add esp, 8
push 0x5cacbc
push 0x15841
push str.misuse
push str._s_at_line__d_of___.10s_
push 0x15
call fcn.0043e300
add esp, 0x14
jmp 0x501aa6
push edi
call dword [0x5dac54]
add esp, 4
test ebx, ebx
je 0x502385
mov edi, dword [ebx]
test edi, edi
jne 0x50231e
push str.API_called_with_finalized_prepared_statement
push 0x15
call fcn.0043e300
push 0x5cacbc
push 0x15592
push str.misuse
push str._s_at_line__d_of___.10s_
push 0x15
call fcn.0043e300
add esp, 0x1c
mov ebx, 0x15
test esi, esi
cmove esi, ebx
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0xc]
test eax, eax
je 0x50232f
push eax
call dword [0x5dac80]
add esp, 4
cmp dword [ebx + 0x8c], 0
jl 0x50234c
jg 0x502343
cmp dword [ebx + 0x88], 0
jbe 0x50234c
mov edx, ebx
mov ecx, edi
call fcn.00465760
mov ecx, ebx
call fcn.00463720
mov ecx, ebx
mov dword [esp + 0x38], eax
call fcn.00463800
cmp byte [edi + 0x57], 0
mov edx, dword [esp + 0x38]
jne 0x502370
test edx, edx
jne 0x502370
xor ebx, ebx
jmp 0x502379
mov ecx, edi
call fcn.0043bb70
mov ebx, eax
mov ecx, edi
call fcn.004e6290
test esi, esi
cmove esi, ebx
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret