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

Disassembly:
sub esp, 0x44
and dword [esp + 0x14], 0
and dword [esp + 0xc], 0
cmp dword [esp + 0x5c], 0
push ebx
push ebp
push esi
push edi
je 0x4962a5
cmp dword [esp + 0x70], 0
je 0x4962a5
mov eax, dword [esp + 0x6c]
mov esi, dword [esp + 0x64]
mov dword [esp + 0x2c], eax
jmp 0x4962ad
mov esi, dword [esp + 0x64]
mov dword [esp + 0x2c], esi
mov edi, dword [esp + 0x58]
push edi
call fcn.0049753d
mov ebx, dword [esp + 0x60]
lea edx, [esi + 1]
pop ecx
mov ebp, eax
mov dword [esp + 0x28], edx
xor ecx, ecx
mov dword [esp + 0x30], ebp
mov eax, dword [ebx + 8]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
test eax, eax
jle 0x4963eb
mov esi, edx
xor eax, eax
mov edx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], esi
cmp ecx, dword [ebx + 4]
je 0x4963d2
mov edx, dword [ebx + 0xc]
movzx edx, byte [eax + edx + 0x14]
test edx, edx
je 0x4963ce
cmp dword [esp + 0x74], 0x63
je 0x496314
mov edx, dword [esp + 0x74]
jmp 0x49631d
push 2
cmp edx, 0x63
pop ecx
cmove edx, ecx
cmp edx, 5
jne 0x496330
mov ecx, dword [ebx + 0xc]
push 2
cmp dword [eax + ecx + 4], 0
pop eax
cmove edx, eax
mov eax, edx
dec eax
je 0x496394
dec eax
je 0x496380
dec eax
je 0x496394
dec eax
je 0x49636e
push esi
push 0x4a
push ebp
call fcn.004a2f61
mov ecx, dword [esp + 0x1c]
mov esi, eax
mov eax, dword [ebx + 0xc]
push dword [esp + 0x2c]
push dword [ecx + eax + 4]
push edi
call fcn.004935e5
push esi
push ebp
call fcn.004a8f90
mov esi, dword [esp + 0x40]
add esp, 0x20
jmp 0x4963c6
push dword [esp + 0x78]
push esi
push 0x49
push ebp
call fcn.004a2f7a
add esp, 0x10
jmp 0x4963c6
mov eax, dword [edi + 0x1a8]
mov ecx, edi
test eax, eax
cmovne ecx, eax
mov byte [ecx + 0x159], 1
push esi
push edx
push 0x13
push 5
push ebp
call fcn.004a2f95
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x24]
push dword [ecx + eax]
push dword [ebx]
push str._s._s_may_not_be_NULL
push dword [edi]
call fcn.00499220
push 0xffffffffffffffff
push eax
push 0xffffffffffffffff
push ebp
call fcn.004a31f6
add esp, 0x34
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
inc ecx
add eax, 0x18
inc esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], eax
cmp ecx, edx
jl 0x4962ee
cmp dword [ebx + 0x2c], 0
je 0x49645b
mov eax, dword [edi]
test dword [eax + 0xc], 0x40000
jne 0x49645b
push ebp
call fcn.004a92f5
mov esi, eax
mov eax, dword [esp + 0x2c]
push 8
push esi
mov dword [edi + 0x50], eax
push dword [ebx + 0x2c]
push edi
call fcn.0049498f
add esp, 0x14
cmp dword [esp + 0x74], 0x63
push 2
pop eax
mov ecx, eax
cmovne ecx, dword [esp + 0x74]
cmp ecx, 4
jne 0x49643e
push dword [esp + 0x78]
push 0
push 1
push ebp
call fcn.004a2f7a
jmp 0x49644f
cmp ecx, 5
push 0
cmove ecx, eax
push 0
push ecx
push edi
call fcn.0049756d
add esp, 0x10
push esi
push ebp
call fcn.004aa6f5
pop ecx
pop ecx
cmp dword [esp + 0x6c], 0
je 0x4965b4
cmp dword [esp + 0x74], 0x63
movzx esi, byte [ebx + 0x23]
je 0x496477
mov esi, dword [esp + 0x74]
jmp 0x496480
push 2
cmp esi, 0x63
pop eax
cmove esi, eax
cmp dword [esp + 0x70], 0
je 0x4964a0
push dword [esp + 0x6c]
push 0
push dword [esp + 0x6c]
push 0x4c
push ebp
call fcn.004a2f95
add esp, 0x14
mov dword [esp + 0x24], eax
push dword [esp + 0x64]
push 0
push dword [esp + 0x68]
push 0x36
push ebp
call fcn.004a2f95
add esp, 0x14
mov dword [esp + 0x6c], eax
test esi, esi
jle 0x49657f
cmp esi, 3
jle 0x496584
cmp esi, 4
je 0x49656f
cmp esi, 5
jne 0x49657f
mov eax, dword [edi]
xor esi, esi
test dword [eax + 0xc], 0x2000000
je 0x4964fd
push esi
push esi
push 0x6a
push ebx
push edi
call fcn.004a1088
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x49653a
push 0
push 0
push ebx
push edi
call fcn.004960f6
add esp, 0x10
test eax, eax
jne 0x49653a
cmp dword [ebx + 0x10], eax
je 0x496565
mov eax, dword [edi + 0x1a8]
mov ecx, edi
push 0
push dword [esp + 0x64]
test eax, eax
push ebx
cmovne ecx, eax
push edi
mov byte [ecx + 0x158], 1
call fcn.00496b74
add esp, 0x10
jmp 0x496565
mov eax, dword [edi + 0x1a8]
mov ecx, edi
push 5
push esi
push 0
push dword [esp + 0x70]
test eax, eax
push dword [esp + 0x70]
cmovne ecx, eax
push ebx
push edi
mov byte [ecx + 0x158], 1
call fcn.004969e3
add esp, 0x1c
mov dword [esp + 0x1c], 1
jmp 0x496595
push dword [esp + 0x78]
push 0
push 1
push ebp
call fcn.004a2f7a
jmp 0x496592
push 2
pop eax
mov esi, eax
push 0xfffffffffffffffe
push str.PRIMARY_KEY_must_be_unique
push esi
push edi
call fcn.0049756d
add esp, 0x10
push dword [esp + 0x6c]
push ebp
call fcn.004a8f90
cmp dword [esp + 0x78], 0
pop ecx
pop ecx
je 0x4965b4
push dword [esp + 0x24]
push ebp
call fcn.004a8f90
pop ecx
pop ecx
mov esi, dword [ebx + 0x10]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
test esi, esi
je 0x4968b4
mov ecx, dword [esp + 0x68]
cmp dword [ecx + eax*4], 0
je 0x4968a0
mov eax, dword [esi + 4]
inc eax
push eax
push edi
call fcn.00496d15
pop ecx
pop ecx
xor ecx, ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x24], ecx
cmp dword [esi + 4], ecx
jle 0x49662e
mov edi, eax
mov eax, dword [esi + 8]
push edi
mov eax, dword [eax + ecx*4]
cmp eax, dword [ebx + 4]
jne 0x496607
push dword [esp + 0x68]
jmp 0x49660c
add eax, dword [esp + 0x2c]
push eax
push 0xf
push ebp
call fcn.004a2f7a
mov ecx, dword [esp + 0x34]
add esp, 0x10
inc ecx
inc edi
mov dword [esp + 0x24], ecx
cmp ecx, dword [esi + 4]
jl 0x4965f5
mov edi, dword [esp + 0x58]
mov eax, dword [esp + 0x6c]
add eax, ecx
push eax
push dword [esp + 0x68]
push 0xf
push ebp
call fcn.004a2f7a
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x78]
mov ebx, dword [esp + 0x7c]
push dword [ecx + eax*4]
mov eax, dword [esi + 4]
inc eax
push eax
push ebx
push 0x1f
push ebp
call fcn.004a2f95
add esp, 0x24
push 0
push esi
push ebp
call fcn.00497933
pop ecx
pop ecx
push eax
push 0xffffffffffffffff
push ebp
call fcn.004a31f6
mov eax, dword [esi + 4]
inc eax
push eax
push ebx
push edi
call fcn.00493504
movzx ebx, byte [esi + 0x18]
add esp, 0x1c
test ebx, ebx
jne 0x4966a3
mov eax, dword [esi + 4]
inc eax
push eax
push dword [esp + 0x70]
push edi
call fcn.0049dd0a
mov ebx, dword [esp + 0x68]
add esp, 0xc
jmp 0x496898
cmp dword [esp + 0x74], 0x63
push 2
pop eax
je 0x4966b3
mov ebx, dword [esp + 0x74]
jmp 0x4966b9
cmp ebx, 0x63
cmove ebx, eax
cmp dword [esp + 0x1c], 0
mov dword [esp + 0x18], ebx
je 0x4966d8
cmp ebx, 4
jne 0x4966ce
push 5
pop ebx
jmp 0x4966d4
cmp ebx, 3
cmove ebx, eax
mov dword [esp + 0x18], ebx
push edi
call fcn.00496d46
push eax
push dword [esp + 0x34]
mov dword [esp + 0x2c], eax
push 0xf
push ebp
call fcn.004a2f7a
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x28]
inc ecx
push 0xfffffffffffffff2
push dword [esp + 0x84]
add eax, ecx
push dword [esp + 0x3c]
push 0
push eax
push 0x35
push ebp
call fcn.004a2fe6
mov ecx, dword [esi + 4]
inc ecx
mov dword [esp + 0x64], eax
push ecx
push dword [esp + 0xa0]
push edi
call fcn.0049dd0a
add esp, 0x3c
test ebx, ebx
jle 0x49682d
cmp ebx, 3
jle 0x496757
cmp ebx, 4
jne 0x49682d
push dword [esp + 0x78]
push 0
push 1
push ebp
call fcn.004a2f7a
add esp, 0x10
jmp 0x496827
push 0xc8
push 0
lea eax, [esp + 0x40]
push 0
push eax
call fcn.004a0c32
mov eax, dword [edi]
add esp, 0x10
cmp dword [esi + 4], 1
mov ecx, str.column
mov dword [esp + 0x38], eax
mov eax, str.columns
cmovle eax, ecx
and dword [esp + 0x24], 0
cmp dword [esi + 4], 0
mov dword [esp + 0x6c], eax
jle 0x4967e2
mov edi, dword [esp + 0x5c]
mov ebp, eax
mov ebx, dword [esp + 0x24]
mov eax, dword [esi + 8]
push 0xffffffffffffffff
push ebp
imul ecx, dword [eax + ebx*4], 0x18
mov eax, dword [edi + 0xc]
mov esi, dword [ecx + eax]
lea eax, [esp + 0x40]
push eax
call fcn.004a0ac4
push 0xffffffffffffffff
lea eax, [esp + 0x48]
mov ebp, 0x4e177c
push esi
push eax
call fcn.004a0ac4
mov esi, dword [esp + 0x28]
add esp, 0x18
inc ebx
cmp ebx, dword [esi + 4]
jl 0x49679d
mov edi, dword [esp + 0x58]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x30]
cmp dword [esi + 4], 1
mov ecx, str._is_not_unique
mov eax, str._are_not_unique
cmovle eax, ecx
push 0xffffffffffffffff
push eax
lea eax, [esp + 0x40]
push eax
call fcn.004a0ac4
lea eax, [esp + 0x44]
push eax
call fcn.004a0bd1
push 0
mov esi, eax
push esi
push ebx
push edi
call fcn.0049756d
push esi
push dword [esp + 0x5c]
call fcn.00491da8
mov esi, dword [esp + 0x38]
add esp, 0x28
mov ebx, dword [esp + 0x5c]
jmp 0x496881
mov eax, dword [edi + 0x1a8]
xor edx, edx
mov ebx, dword [esp + 0x5c]
test eax, eax
mov ecx, edi
cmovne ecx, eax
mov byte [ecx + 0x158], 1
mov eax, dword [edi]
test dword [eax + 0xc], 0x2000000
je 0x496862
push edx
push edx
push 0x6a
push ebx
push edi
call fcn.004a1088
add esp, 0x14
mov edx, eax
push 5
push edx
push 0
push dword [esp + 0x2c]
push dword [esp + 0x70]
push ebx
push edi
call fcn.004969e3
add esp, 0x1c
mov dword [esp + 0x1c], 1
push dword [esp + 0x34]
push ebp
call fcn.004a8f90
push dword [esp + 0x28]
push edi
call fcn.0049dd33
add esp, 0x10
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x14]
mov esi, dword [esi + 0x20]
inc eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
test esi, esi
jne 0x4965cd
mov eax, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
test eax, eax
je 0x4968c6
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
add esp, 0x44
ret