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

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x24]
push edi
mov edi, dword [ebx + 8]
mov eax, dword [ebx]
mov dword [esp + 0x10], eax
test edi, edi
jne 0x51e97c
cmp dword [ebx + 0x74], edi
jne 0x51e965
test byte [eax + 0x50], 8
jne 0x51e965
mov byte [ebx + 0x17], 1
push ebx
call fcn.005617d0
mov edi, eax
add esp, 4
mov eax, dword [esp + 0x10]
test edi, edi
je 0x51eb30
mov ecx, dword [esp + 0x2c]
mov eax, dword [eax + 0x10]
shl ecx, 4
push esi
add eax, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
xor esi, esi
push ebp
push dword [eax]
mov ebp, dword [esi*8 + 0x5c4d28]
push ebp
push dword [esp + 0x20]
mov byte [esp + esi + 0x1c], 0
call fcn.0053fcc0
add esp, 0xc
test eax, eax
jne 0x51ea16
cmp esi, 1
jge 0x51e9e0
push dword [esi*8 + 0x5c4d2c]
mov eax, dword [esp + 0x18]
push ebp
push dword [eax]
push str.CREATE_TABLE__Q._s__s_
push ebx
call fcn.0054ead0
mov eax, dword [ebx + 0x5c]
add esp, 0x14
mov dword [esp + esi*4 + 0x20], eax
mov byte [esp + esi + 0x10], 0x10
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
inc esi
cmp esi, 3
jl 0x51e994
mov esi, dword [edi + 0x74]
pop ebp
cmp dword [edi + 0x78], esi
jg 0x51eacd
push edx
push dword [esp + 0x20]
push dword [esp + 0x3c]
push 0x70
push edi
call fcn.00515850
add esp, 0x14
mov esi, eax
jmp 0x51eafd
mov edx, dword [esp + 0x34]
mov ecx, dword [eax + 0x14]
mov dword [esp + esi*4 + 0x20], ecx
cmp edx, 1
je 0x51ea4f
mov eax, dword [ebx]
mov edx, dword [esp + 0x1c]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + edx + 4]
mov edx, dword [esp + 0x34]
cmp byte [eax + 9], 0
je 0x51ea4f
push ebp
push 1
push ecx
push edx
push ebx
call fcn.0051a4f0
mov edx, dword [esp + 0x48]
add esp, 0x14
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x51ea76
push eax
push dword [esp + 0x44]
mov eax, dword [esp + 0x1c]
push ebp
push dword [eax]
push str.DELETE_FROM__Q._s_WHERE__s_Q
push ebx
call fcn.0054ead0
add esp, 0x18
jmp 0x51e9e0
mov ecx, dword [edi + 0x74]
mov ebp, dword [esp + esi*4 + 0x20]
cmp dword [edi + 0x78], ecx
jg 0x51ea99
push 0
push edx
push ebp
push 0x90
push edi
call fcn.00515850
add esp, 0x14
jmp 0x51e9e0
mov ebx, dword [esp + 0x30]
lea eax, [ecx + 1]
mov dword [edi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [edi + 0x70]
mov dword [eax + ecx*4], 0x90
mov dword [eax + ecx*4 + 4], ebp
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
jmp 0x51e9e4
lea eax, [esi + 1]
mov dword [edi + 0x74], eax
lea ecx, [esi + esi*4]
mov eax, dword [edi + 0x70]
mov dword [eax + ecx*4], 0x70
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x34]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [ecx + 8], eax
mov eax, dword [edi]
cmp byte [eax + 0x57], 0
jne 0x51eb18
mov eax, dword [edi + 0x70]
lea ecx, [esi + esi*4]
mov byte [eax + ecx*4 + 1], 0xfd
mov dword [eax + ecx*4 + 0x10], 3
mov eax, dword [edi + 0x74]
pop esi
test eax, eax
jle 0x51eb30
movzx edx, byte [esp + 8]
lea ecx, [eax + eax*4]
mov eax, dword [edi + 0x70]
mov word [eax + ecx*4 - 0x12], dx
pop edi
pop ebx
add esp, 0x1c
ret